LANYINGDevelopers
Web & Mini ProgramiOSAndroidC++Server API

rtcManage#

rtcManage#

RTC management

rtcManage.initRTCEngine(params) ⇒ null#

Initiate an audio and video call

Kind: static method of rtcManage

ParamTypeDescription
paramsobjectinitialization parameter
params.serverstringRTC server address
params.idnumberuser id
params.callerbooleanuser is caller or not
params.receivernumberreceiver id
params.pinstringjoin room pin code
params.hasVideobooleanhas video stream
params.hasAudiobooleanhas audio stream
params.attachStreamfunctionVoice & video call stream handler
params.getThroughfunctiongetThrough process function
params.hangupCallfunctionhangupCall process function
params.getHangUpStatusfunctionHang-up state getter. The following parameters are required when caller is true (callee parameters).
params.roomIdnumberRoom ID that the callee is invited to join. The following parameters are required when caller is true (caller parameters).
params.secretstringcreate rtc room secret
params.callIdstringRequired voice & video session parameters when creating a call with a call ID, including the video width and height setters.
params.widthnumbervideo width
params.heightnumbervideo height

rtcManage.destroy() ⇒ null#

Destroy function(destroy rtc environment)

Kind: static method of rtcManage

Type
null

rtcManage.sendRTCMessage(msg) ⇒ number#

Send RTC message

Kind: static method of rtcManage
Returns: number - client generate RTC message id

ParamTypeDescription
msgobjectmessage body
msg.uidstringreceiver ID
msg.contentstringMessage content
msg.configstring | objectExtension data

rtcManage.joinRoom(params) ⇒ null#

Join RTC room

Kind: static method of rtcManage

ParamTypeDescription
paramsobjectinitialization parameters

rtcManage.leaveRoom() ⇒ null#

Leave RTC room

Kind: static method of rtcManage

Type
null

rtcManage.publish(type, hasVideo, hasAudio) ⇒ null#

Publish local video/audio streams

Kind: static method of rtcManage

ParamTypeDescription
typeenumdisable flag
hasVideobooleanhas video stream
hasAudiobooleanhas audio stream

rtcManage.unPublish() ⇒ null#

Unpublish operation

Kind: static method of rtcManage

Type
null

rtcManage.subscribe(sources) ⇒ null#

Subscribe remote video/audio streams

Kind: static method of rtcManage

ParamType
sourcesArray

rtcManage.unSubscribe(id) ⇒ null#

UnSubscribe stream operation

Kind: static method of rtcManage

ParamTypeDescription
idnumberunSubscribe stream id

rtcManage.muteLocalAudio(mute) ⇒ null#

Mute local audio or not

Kind: static method of rtcManage

ParamTypeDescription
mutebooleanmute flag

rtcManage.muteLocalVideo(mute) ⇒ null#

Mute local video or not

Kind: static method of rtcManage

ParamTypeDescription
mutebooleanmute flag

rtcManage.muteRemoteAudio(stream, mute) ⇒ null#

Mute remote audio or not

Kind: static method of rtcManage

ParamTypeDescription
streamobjectmute stream id
mutebooleanmute flag

rtcManage.muteRemoteVideo(stream, mute) ⇒ null#

Mute remote video or not

Kind: static method of rtcManage

ParamTypeDescription
streamobjectmute stream id
mutebooleanmute flag

rtcManage.getJanusObject() ⇒ object#

Get janus object handler

Kind: static method of rtcManage

Type
null

rtcManage.getPublishHandler() ⇒ object#

Get publisher object handler

Kind: static method of rtcManage

Type
null

rtcManage.getSubscribeHandler() ⇒ object#

Get subscriber object handler

Kind: static method of rtcManage

Type
null
Generated API content with concise AI notes where context helps.