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

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="initRTCEngine" %}{% endlanying_code_snippet %}

rtcManage.destroy() ⇒ null#

Destroy function(destroy rtc environment)

Kind: static method of rtcManage

Type
null

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="destroy" %}{% endlanying_code_snippet %}

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

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="sendRTCMessage" %}{% endlanying_code_snippet %}

rtcManage.joinRoom(params) ⇒ null#

Join RTC room

Kind: static method of rtcManage

ParamTypeDescription
paramsobjectinitialization parameters

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="joinRoom" %}{% endlanying_code_snippet %}

rtcManage.leaveRoom() ⇒ null#

Leave RTC room

Kind: static method of rtcManage

Type
null

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="leaveRoom" %}{% endlanying_code_snippet %}

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

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="publish" %}{% endlanying_code_snippet %}

rtcManage.unPublish() ⇒ null#

Unpublish operation

Kind: static method of rtcManage

Type
null

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="publish" %}{% endlanying_code_snippet %}

rtcManage.subscribe(sources) ⇒ null#

Subscribe remote video/audio streams

Kind: static method of rtcManage

ParamType
sourcesArray

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="subscribe" %}{% endlanying_code_snippet %}

rtcManage.unSubscribe(id) ⇒ null#

UnSubscribe stream operation

Kind: static method of rtcManage

ParamTypeDescription
idnumberunSubscribe stream id

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="unSubscribe" %}{% endlanying_code_snippet %}

rtcManage.muteLocalAudio(mute) ⇒ null#

Mute local audio or not

Kind: static method of rtcManage

ParamTypeDescription
mutebooleanmute flag

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="muteLocalAudio" %}{% endlanying_code_snippet %}

rtcManage.muteLocalVideo(mute) ⇒ null#

Mute local video or not

Kind: static method of rtcManage

ParamTypeDescription
mutebooleanmute flag

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="muteLocalVideo" %}{% endlanying_code_snippet %}

rtcManage.muteRemoteAudio(stream, mute) ⇒ null#

Mute remote audio or not

Kind: static method of rtcManage

ParamTypeDescription
streamobjectmute stream id
mutebooleanmute flag

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="muteRemoteAudio" %}{% endlanying_code_snippet %}

rtcManage.muteRemoteVideo(stream, mute) ⇒ null#

Mute remote video or not

Kind: static method of rtcManage

ParamTypeDescription
streamobjectmute stream id
mutebooleanmute flag

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="muteRemoteVideo" %}{% endlanying_code_snippet %}

rtcManage.getJanusObject() ⇒ object#

Get janus object handler

Kind: static method of rtcManage

Type
null

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="getJanusObject" %}{% endlanying_code_snippet %}

rtcManage.getPublishHandler() ⇒ object#

Get publisher object handler

Kind: static method of rtcManage

Type
null

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="getPublishHandler" %}{% endlanying_code_snippet %}

rtcManage.getSubscribeHandler() ⇒ object#

Get subscriber object handler

Kind: static method of rtcManage

Type
null

Example

{% lanying_code_snippet repo="lanying-im-web",class="rtcManage",function="getSubscribeHandler" %}{% endlanying_code_snippet %}
Generated API content with concise AI notes where context helps.