Cocos Creator API

1.4.x

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

ProtocolREC

Extends PluginProtocol
Module: anysdk

REC protocol

Methods

share
(
  • info
)

share video

name type description
info Object

Type: map

startRecording ( )

Start to record video

stopRecording ( )

Start to record video

setListener
(
  • listener
  • target
)

set listener

name type description
listener Function
target Object

getListener ( ) Function

get listener

returns:

type: Function

listener

pauseRecording ( )

pause to record video Before to invoke, you need to verdict whether this properties existed

resumeRecording ( )

resume to record video Before to invoke, you need to verdict whether this properties existed

isAvailable ( ) boolean

get whether the device is isAvailable Before to invoke, you need to verdict whether this properties existed

returns:

type: boolean

isRecording ( ) boolean

get status of recording Before to invoke, you need to verdict whether this properties existed

returns:

type: boolean

showToolBar ( )

show toolbar Before to invoke, you need to verdict whether this properties existed

hideToolBar ( )

hide toolbar Before to invoke, you need to verdict whether this properties existed

showVideoCenter ( )

show video center Before to invoke, you need to verdict whether this properties existed

enterPlatform ( )

enter platform Before to invoke, you need to verdict whether this properties existed

setMetaData
(
  • info
)

Set the video data, it is recommended to check whether are recorded firstly Before to invoke, you need to verdict whether this properties existed

name type description
info Object

Type: map

isFunctionSupported
(
  • functionName
)
boolean

Inherited from PluginProtocol:

Check whether the function is supported

name type description
functionName String

returns:

type: boolean

getPluginName ( ) String

Inherited from PluginProtocol:

get plugin name

returns:

type: String

getPluginVersion ( ) String

Inherited from PluginProtocol:

get plugin version

returns:

type: String

getSDKVersion ( ) String