Methods
changeCameraByIndex(index)
【desc】Sets the current camera to use based on the camera ID passed in(指定摄像头为当前会议使用的设备)
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | The index of cameras in the list of cameras returned by the getCameraDevicesList(getCameraDevicesList()函数返回的设备列表的索引) |
changeCameraByUID(uniqueId)
【desc】Sets the current camera to use based on the camera uniqueId passed in(通过uniqueId指定摄像头为当前会议使用的设备)
Parameters:
| Name | Type | Description |
|---|---|---|
uniqueId |
Number | The uniqueId of cameras in the list of cameras returned by the getCameraDevicesList(getCameraDevicesList()函数返回的设备列表的中的摄像头uniqueId) |
changeNickName(roomId, peerId, nickName)
【desc】Modify the attendee user nickname(修改与会者用户的昵称,仅在本次会议有效)
Parameters:
| Name | Type | Description |
|---|---|---|
roomId |
Number | The meeting number(会议号) |
peerId |
Number | The ID of the participant in the meeting(参会者ID) |
nickName |
string | The user nickname(参会者用户昵称) |
changeNickNameV2(userId, nickName)
【desc】Modify the attendee user nickname(修改与会者用户的昵称,仅在本次会议有效)
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string | The ID of the participant in the meeting(参会者ID) |
nickName |
string | The user nickname(参会者用户昵称) |
changeVideoStream(peerId, streamId, streamSubscribeModelType, streamBitrateType)
【desc】Video size stream hot swap(视频大小流热切换)
Parameters:
| Name | Type | Description |
|---|---|---|
peerId |
Number | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
streamSubscribeModelType |
Number | Subscription flow pattern(1:自动;2:固定;) |
streamBitrateType |
Number | The size of the flow(0:小流;1:大流;) |
changeVideoStreamV2(userId, streamId, streamSubscribeModelType, streamBitrateType)
【desc】Video size stream hot swap(视频大小流热切换)
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
streamSubscribeModelType |
Number | Subscription flow pattern(1:自动;2:固定;) |
streamBitrateType |
Number | The size of the flow(0:小流;1:大流;) |
checkOpenGLJAIManager(venderType, authInfo, outputPath, cb)
check opengl.(检查OpenGL环境)
Parameters:
| Name | Type | Description |
|---|---|---|
venderType |
Number | vender type, only support st_mobile.(厂商类型,目前仅支持商汤,传0) |
authInfo |
String | The authentication information.(鉴权信息) |
outputPath |
String | Output directory for storing generated local certificates.(输出目录,用于存储生成的本地证书等) |
cb |
function | Call this function after execution with the following error code.(执行完成后调用此函数,错误码如下) The format of the cb is function (Number errorCode){ } The errorCode description: 0:succeed.(成功) -1:load JAIManager fail.(加载JAIManager失败) -2:There are currently incomplete calls.(当前存在未完成的调用) -3:Vendor not supported.(厂商不支持) -4:Authentication failed.(鉴权失败) -5:init OpenGL fail.(OpenGL初始化失败) -6:init vender library fail.(美颜库初始化失败) -7:load vender resource fail.(美颜库资源加载失败) -8:decode image file fail.(图片文件解码失败) -9:Illegal operation.(操作不合法) -10:internal error.(内部错误) |
disableJAIManagerFeature()
Disable the video processing feature.(禁用视频处理特性)
enabelJAIManagerFeature(featureType, imagePath, cb)
Enable the video processing feature.(启用视频处理特性)
Parameters:
| Name | Type | Description |
|---|---|---|
featureType |
Number | Processing type: 0: virtual background 1: background blur. There can only be one at a time.(处理类型,0:虚拟背景 1:背景模糊,只能同时存在一个) |
imagePath |
String | featureType==0时,imagePath表示图片文件路径;featureType==1时,imagePath用字符串表示模糊的模式和强度,字符串形如“a:b”,其中a表示模式,取值0或1,b表示强度,取值0-100 |
cb |
function | same as initJAIManager.(同上) |
enterRoom(enterParam)
【desc】Enter the meeting(进入会议)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enterParam |
Object | The parameters required to enter the meeting, which is an object, have the following properties(进入会议参数对象)
Properties
|
exitRoom(cb)
【desc】Exit the meeting(退出房间)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | The result of exiting room is returned through this function,0 indicates success and -1 indicates failure (该回调函数返回退出房间的结果,0表示成功,-1表示失败).cb 格式: function (ret){} |
findWindowIdByTitle(title)
【desc】Retrive the hwnd of the window by the window title.(通过窗口的标题获取窗口句柄)
Parameters:
| Name | Type | Description |
|---|---|---|
title |
String | window title.(窗口标题) |
Returns:
Returns a window handle of type Number if found, otherwise,return null.(如果找到则返回Number类型的窗口句柄,否则返回null)
generateToken(param)
Generate token.
Parameters:
| Name | Type | Description |
|---|---|---|
param |
getCameraDevicesList(cb)
【desc】Gets a list of camera devices(获取设备摄像头列表)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | The list of camera device is returned through this function.This function takes array,which contain id {Number}, uniqueId {string}, and name{string}.If the camera list is empty, the array Object is null(设备的摄像头列表由此回调函数返回,该函数入参为 一个数组,数组元素为对象,有三个属性:id、deviceid和name.如果摄像头列表为空,则array object 是null) |
getDeviceId() → {String}
【desc】 get device ID.(获取设备ID)
Returns:
device ID.(设备ID)
- Type
- String
getMicrophoneVolume() → {Number}
【desc】Get microphone volume.(获取麦克风音量)
Returns:
volume value,range:0~255.(音量范围0~255)
- Type
- Number
getPlayoutSources(cb)
【desc】Get playout sources(获取设备的扬声器列表)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | The list of loudspeak is returned through this function.This function takes array object, which contain three property:id {Number}, name {string}, and uniqueId{string}.If the speaker list is empty, array Object is null(设备的扬声器列表由此回调函数返回,该函数入参为一个数组,数组元素为对象,有三个属性:id、name和uniqueId. 如果扬声器列表为空,则array object 是null) |
getRecordingSources(cb)
【desc】Get recording sources(获取设备的麦克风列表)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | The list of mic is returned through this function.This function takes array object, which contain three property:id {Number}, name {string}, and uniqueId{string}.If the microphone list is empty, array Object is null(设备的麦克风列表由此回调函数返回,该函数入参为一个数组,数组元素为对象,有三个属性: id、name和uniqueId.如果麦克风列表为空,则array object 是null) |
getScreenCaptureSources(cb)
【desc】Gets a list of shared desktops(获取可共享的屏幕列表)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | Callback function that returns a list of available desktops,which contain three property:id {Number}, uniqueId {string}, and name{string}.If the shared screen list is empty, the Array Object is null.(屏幕列表由此回调函数返回, 该回调函数的参数为数组,数组元素为对象,包含三个属性:id、deviceId和name.如果共享屏幕列表为空,则array object 是null.) |
getSDKStats(cb)
【desc】 Get SDK Status.(获取SDK状态)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | This function is called when the SDK status is retrieved.(当获取到SDK状态时调用此函数) The format of the cb is function (String stats){ } |
getSDKStatsByAsync() → {Object}
【desc】 Get SDK Status.(获取SDK状态)
Returns:
- Return a promise object,the parameter is of type string.(返回一个Promise对象,参数的类型是string)
- Type
- Object
getSpeakerVolume() → {Number}
【desc】Get speak volume.(获取扬声器音量)
Returns:
volume value,range:0~255.(音量范围0~255)
- Type
- Number
getSystemSleepState() → {Number}
【desc】 Get system sleep state.(获取系统睡眠状态)
Returns:
state:1:sleep;0:resume.(状态)
- Type
- Number
getWindowCaptureSources(cb)
【desc】Gets a list of shared application Windows(获取可共享的应用程序列表)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | Callback function that returns a list of available applications,which contain three property:id {Number}, uniqueId {string}, and name{string}.If the shared application list is empty, the array Object is null(应用程序列表由此回调函数返 回,该回调函数的参数为数组,数组元素为对象,包含三个属性:id、deviceId和 name.如果共享应用列表为空,则array object 是null) |
hasMacVirtualDevice() → {Number}
HasMacAudioDeviceByDevUid
Returns:
1:has 0:not has.
- Type
- Number
initEngine()
【desc】Init the JRTCEngine(初始化JRTCEngine)
Example
Usage of init.
var engine = new JRTCEngine();
engine.init();
initJAIManager(venderType, authInfo, outputPath, cb)
init JAIManager.(初始化JAIManager)
Parameters:
| Name | Type | Description |
|---|---|---|
venderType |
Number | vender type, only support st_mobile.(厂商类型,目前仅支持商汤,传0) |
authInfo |
String | The authentication information.(鉴权信息) |
outputPath |
String | Output directory for storing generated local certificates.(输出目录,用于存储生成的本地证书等) |
cb |
function | Call this function after execution with the following error code.(执行完成后调用此函数,错误码如下) The format of the cb is function (Number errorCode){ } The errorCode description: 0:succeed.(成功) -1:load JAIManager fail.(加载JAIManager失败) -2:There are currently incomplete calls.(当前存在未完成的调用) -3:Vendor not supported.(厂商不支持) -4:Authentication failed.(鉴权失败) -5:init OpenGL fail.(OpenGL初始化失败) -6:init vender library fail.(美颜库初始化失败) -7:load vender resource fail.(美颜库资源加载失败) -8:decode image file fail.(图片文件解码失败) -9:Illegal operation.(操作不合法) -10:internal error.(内部错误) |
initJAIManagerByAppId(venderType, appId, cb)
init JAIManager.(初始化JAIManager)
Parameters:
| Name | Type | Description |
|---|---|---|
venderType |
Number | vender type, only support st_mobile.(厂商类型,目前仅支持商汤,传0) |
appId |
string | AppId obtained from the management according to the meeting number(appId,根据会议号从会控服务获取token时返回的appId) |
cb |
function | Call this function after execution with the following error code.(执行完成后调用此函数,错误码如下) The format of the cb is function (Number errorCode){ } The errorCode description: 0:succeed.(成功) -1:load JAIManager fail.(加载JAIManager失败) -2:There are currently incomplete calls.(当前存在未完成的调用) -3:Vendor not supported.(厂商不支持) -4:Authentication failed.(鉴权失败) -5:init OpenGL fail.(OpenGL初始化失败) -6:init vender library fail.(美颜库初始化失败) -7:load vender resource fail.(美颜库资源加载失败) -8:decode image file fail.(图片文件解码失败) -9:Illegal operation.(操作不合法) -10:internal error.(内部错误) -11:Authentication file download failed.(鉴权文件下载失败) |
installAudioDrive()
installAudioDrive
muteLocalAudio(mute)
【desc】Stay connected to the server and pause or resume the push of local audio streams(暂停本地音频流)
Parameters:
| Name | Type | Description |
|---|---|---|
mute |
boolean | ture:pause;false:resume(true表示暂停,false表示恢复) |
muteLocalVideo(mute)
【desc】Maintains the connection to the server but suspends the push of local video(暂停本地视频流)
Parameters:
| Name | Type | Description |
|---|---|---|
mute |
boolean | ture:pause;false:resume(true表示暂停,false表示恢复) |
muteRemoteVideo(peerId, streamId, mute)
【desc】Pause the remote user's video stream,remote desktop video is not included(暂停远程视频流,不包括远程桌面视频)
Parameters:
| Name | Type | Description |
|---|---|---|
peerId |
Number | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The video stream ID of the participant(远程视频流ID) |
mute |
boolean | ture:pause;false:resume(true表示暂停,false表示恢复) |
muteRemoteVideoV2(userId, streamId, mute)
【desc】Pause the remote user's video stream,remote desktop video is not included(暂停远程视频流,不包括远程桌面视频)
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The video stream ID of the participant(远程视频流ID) |
mute |
boolean | ture:pause;false:resume(true表示暂停,false表示恢复) |
printLog(logInfo)
【desc】Print log to sdk log file.(打印日志到sdk日志文件)
Parameters:
| Name | Type | Description |
|---|---|---|
logInfo |
string | log information to print.(要打印的日志信息) |
sendChatMessage(msg)
【desc】Send chat message (发送聊天信息)
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
msg |
Object | Message sending object(聊天信息对象)
Properties
|
sendControlMessage(peerId, messageType, content)
【desc】Send control message(发送控制消息)
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
peerId |
Number | The ID of the participant in the meeting(参会者ID,如指定某个成员的id,则该消息只针对该成员,若要对所有成员发送消息,该参数设置为-1) | |||||||||
messageType |
Number | message type(要发送的消息类型:0:none;1:使单个成员静音;2:全体静音;5:关闭单个成员视频;6:关闭 所有所有成员视频;9.自定义消息(如:jrtc_unMuteAllAudio、jrtc_unMutePeerAudio、jrtc_creatNewHoster jrtc_closeMeeting、jrtc_allowUnmuteSelf、jrtc_putDownHands、jrtc_raiseHands、jrtc_refuseRaiseHands、jrtc_modifyNickName),用法 见下面示例) | |||||||||
content |
Object | message content(消息所携带的信息)
Properties
|
Examples
使单个成员静音
var content = {
fromPeerId:421282,
toPeerId:421278
};
sendControlMessage(421278,1,content);
全体静音
sendControlMessage(-1,2);
关闭单个成员视频
var content = {
fromPeerId:421282,
toPeerId:421278
};
sendControlMessage(421278,5);
关闭所有所有成员视频
sendControlMessage(-1,6);
自定义消息
1.jrtc_unMuteAllAudio
var content = {
event:"jrtc_unMuteAllAudio",
extraData:"{\"formPeerId\":133}"
};
sendControlMessage(-1,9,content);
2.jrtc_unMutePeerAudio
var peerId = 133;
var content = {
event:"jrtc_unMutePeerAudio",
extraData:"{\"formPeerId\":133,\"toPeerId\":134}"
};
sendControlMessage(peerId,9,content);
3.jrtc_creatNewHoster
var content = {
event:"jrtc_creatNewHoster",
extraData:""
};
sendControlMessage(-1,9,content);
4.jrtc_closeMeeting
var content = {
event:"jrtc_closeMeeting",
extraData:"133"
};
sendControlMessage(-1,9,content);
5.jrtc_allowUnmuteSelf
var peerId = 133;
var content = {
event:"jrtc_allowUnmuteSelf",
extraData:"{\"allowUnmuteSelf\":true}"
};
sendControlMessage(peerId,9,content);
6.jrtc_putDownHands
var content = {
event:"jrtc_putDownHands",
extraData:"{\"peerId\":133}"
};
sendControlMessage(-1,9,content);
7.jrtc_raiseHands
var content = {
event:"jrtc_raiseHands",
extraData:"{\"peerId\":133}"
};
sendControlMessage(-1,9,content);
8.jrtc_refuseRaiseHands
var content = {
event:"jrtc_refuseRaiseHands",
extraData:"{\"peerId\":133}"
};
sendControlMessage(-1,9,content);
9.jrtc_modifyNickName
var content = {
event:"jrtc_modifyNickName",
extraData:"{\"peerId\":133,\"nickName\":\"xxx\",\"meetingCode\":\"173\"}"
};
sendControlMessage(-1,9,content);
sendControlMessageV2(userId, messageType, content)
【desc】Send control message(发送控制消息)
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
userId |
string | The ID of the participant in the meeting(参会者ID,如指定某个成员的id,则该消息只针对该成员,若要对所有成员发送消息,该参数设置为-1) | |||||||||
messageType |
Number | message type(要发送的消息类型:0:none;1:使单个成员静音;2:全体静音;5:关闭单个成员视频;6:关闭 所有所有成员视频;9.自定义消息(如:jrtc_unMuteAllAudio、jrtc_unMutePeerAudio、jrtc_creatNewHoster jrtc_closeMeeting、jrtc_allowUnmuteSelf、jrtc_putDownHands、jrtc_raiseHands、jrtc_refuseRaiseHands、jrtc_modifyNickName),用法 见下面示例) | |||||||||
content |
Object | message content(消息所携带的信息)
Properties
|
Examples
使单个成员静音
var content = {
fromUserId:"xxxxxx",
toUserId:"xxxxxx-ssss"
};
sendControlMessageV2("xxxxxx-ssss",1,content);
全体静音
sendControlMessageV2(-1,2);
关闭单个成员视频
var content = {
fromUserId:"xxxxxx",
toUserId:"xxxxxx-ssss"
};
sendControlMessageV2("xxxxxx-ssss",5);
关闭所有所有成员视频
sendControlMessageV2(-1,6);
自定义消息
1.jrtc_unMuteAllAudio
var content = {
event:"jrtc_unMuteAllAudio",
extraData:"{\"formUserId\":"xxxxxx"}"
};
sendControlMessageV2(-1,9,content);
2.jrtc_unMutePeerAudio
var content = {
event:"jrtc_unMutePeerAudio",
extraData:"{\"frimUserId\":"xxxxxx",\"toUserId\":"xxxxxx-ssss"}"
};
sendControlMessageV2("xxxxxx-ssss",9,content);
3.jrtc_creatNewHoster
var content = {
event:"jrtc_creatNewHoster",
extraData:""
};
sendControlMessageV2(-1,9,content);
4.jrtc_closeMeeting
var content = {
event:"jrtc_closeMeeting",
extraData:"133"
};
sendControlMessageV2(-1,9,content);
5.jrtc_allowUnmuteSelf
var content = {
event:"jrtc_allowUnmuteSelf",
extraData:"{\"allowUnmuteSelf\":true}"
};
sendControlMessageV2("xxxxxx-ssss",9,content);
6.jrtc_putDownHands
var content = {
event:"jrtc_putDownHands",
extraData:"{\"userId\":"xxxxxx"}"
};
sendControlMessageV2(-1,9,content);
7.jrtc_raiseHands
var content = {
event:"jrtc_raiseHands",
extraData:"{\"userId\":"xxxxxx"}"
};
sendControlMessageV2(-1,9,content);
8.jrtc_refuseRaiseHands
var content = {
event:"jrtc_refuseRaiseHands",
extraData:"{\"userId\":"xxxxxx"}"
};
sendControlMessageV2(-1,9,content);
9.jrtc_modifyNickName
var content = {
event:"jrtc_modifyNickName",
extraData:"{\"userId\":"xxxxxx",\"nickName\":\"xxx\",\"meetingCode\":\"173\"}"
};
sendControlMessageV2(-1,9,content);
setApiListener(objListener)
【desc】Set the event listener object to receive notifications from the JRTCEngine(设置监听类,用于接收服务器的通知)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
objListener |
Object | Event listener object, containing the following properties(事件监听对象)
Properties
|
setApiListenerV2(objListener)
【desc】Set the event listener object to receive notifications from the JRTCEngine(设置监听类,用于接收服务器的通知)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
objListener |
Object | Event listener object, containing the following properties(事件监听对象)
Properties
|
setApiUrl(apiURL)
【desc】 set api url.(设置API URL)
Parameters:
| Name | Type | Description |
|---|---|---|
apiURL |
string | To set API URL.(要设置的API URL) |
setAppName(appName)
【desc】 Set application name,the name must be in English.(设置应用程序名称,名称需为英文)
Parameters:
| Name | Type | Description |
|---|---|---|
appName |
string | application name.(应用程序名称) |
setAudioAINoiseExEnable(enable)
【desc】 Enable audio AI noise setting.(启用音频AI噪声设置)
Parameters:
| Name | Type | Description |
|---|---|---|
enable |
boolean | true:enable;false:disable.(true:启用;false:停用) |
setCameraDeviceByUID(uniqueId)
【desc】Sets the current camera to use based on the camera uniqueId passed in(通过uniqueId指定当前会议使用的视频设备)
Parameters:
| Name | Type | Description |
|---|---|---|
uniqueId |
Number | The uniqueId of cameras in the list of cameras returned by the getCameraDevicesList(getCameraDevicesList()函数返回的设备列表的中的摄像头uniqueId) |
setCurrentCameraDevice(index)
【desc】Sets the current camera to use based on the camera ID passed in(指定摄像头为当前会议使用的设备)
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | The index of cameras in the list of cameras returned by the getCameraDevicesList(getCameraDevicesList()函数返回的设备列表的索引) |
setDebugLogCallback(cb)
【desc】set log callback.(设置日志回调函数)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | log callback(日志回调函数) cb format:string cb(type,log); type:Number; log:string; |
setDebugLogEnable(enabled)
Set debug log enable
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
* |
setEnv(envId)
【desc】Setting up the server environment(设置当前使用的服务器环境)
Parameters:
| Name | Type | Description |
|---|---|---|
envId |
Number | 0 represents the development environment,1 represents the gray scale environment of the cloud wing,2 represents the cloud wingline environment(0:开发环境;1:云翼灰度环境;2:云翼线上环境) |
Example
Usage of setEnv.
var engine = new JRTCEngine();
engine.init(133,username);
engine.setEnv(2); //the cloud wingline environment
setExternalRecordingStateCallback(cb)
【desc】Set a callback to require the external mic state.(设置回调函数来获取外部麦克风设备的状态)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
The external mic state is returned through this function,true indicates mute and false indicates unmute. You set null to cancel requiring mic state.(外部麦克风的状态通过此函数获取,true表示外部设备麦克风静音,false表示解除静音 你能设置null来取消麦克风状态获取). cb 格式: function (state) |
setLocalVideoMirror(isMirror)
【desc】Set up local video mirroring.(设置本地视频镜像)
Parameters:
| Name | Type | Description |
|---|---|---|
isMirror |
boolean | mirror:true,no mirror:false.(true代表镜像,false代表非镜像) |
setMicrophoneVolume(index)
Set the microphone volume
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | volume size,0~100(音量大小,范围0~100) |
setPlayoutDevice(index)
【desc】Set playout device(设置会议使用的扬声器设备)
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | The index of loudspeak in the list returned by the getPlayoutSources(getPlayoutSources()函数返回的设备列表的索引) |
setPlayoutDeviceByUID(uniqueId)
【desc】Set playout device by the uniqueId(通过设备的uniqueId设置会议使用的扬声器设备)
Parameters:
| Name | Type | Description |
|---|---|---|
uniqueId |
Number | The uniqueId of loudspeak in the list returned by the getPlayoutSources(getPlayoutSources()函数返回的设备列表中的uniqueId) |
setRecordingDevice(index)
【desc】Set recording device(设置会议使用的麦克风设备)
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | The index of mic in the list returned by the getRecordingSources(getRecordingSources()函数返回的设备列表的索引) |
setRecordingDeviceByUID(uniqueId)
【desc】Set recording device by uniqueId(通过设备的uniqueId设置会议使用的麦克风设备)
Parameters:
| Name | Type | Description |
|---|---|---|
uniqueId |
Number | The uniqueId of mic in the list returned by the getRecordingSources(getRecordingSources()函数返回的设备列表中的uniqueId) |
setSDKConfigParam(config)
【desc】 Set SDK configuration parameters.(设置SDK配置参数)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
Properties
|
setSDKConfigPath(path)
【desc】Set the config file path of the SDK.(设置SDK配置文件路径)
Parameters:
| Name | Type | Description |
|---|---|---|
path |
String | the config file path of the SDK.(SDK配置文件路径) |
setSDKConfigString(path)
【desc】Set the config string of the SDK.(设置SDK配置字符串)
Parameters:
| Name | Type | Description |
|---|---|---|
path |
String | the config string of the SDK.(SDK配置文件字符串) |
setVideoEncodingParam(resolution, fps)
【desc】Set video encoding parameters(设置视频编码参数)
Parameters:
| Name | Type | Description |
|---|---|---|
resolution |
Number | Video resolution(分辨率) |
fps |
Number | Video frame rate(帧率) |
startDesktopCapturePreview(desktopCapturePreview)
【desc】Start remote desktop capture video(开始远程桌面视频捕获预览)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
desktopCapturePreview |
Object | (远程桌面视频参数对象)
Properties
|
startDesktopCaptureShare(desktopPreviewParam)
【desc】Start desktop sharing video(开始桌面共享)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
desktopPreviewParam |
Object | Parameters required when sharing a screen (桌面共享参数对象)
Properties
|
|||||||||||||||||||||||||||||||||
desktopCapturePreview.excludedWindowIds |
Array.<Number> | Exclude window id that can contain multiple window ids ,it is valid when the desktopPreviewParam.desktopType is 0. (要排除窗口的ID,可以包含多个窗口id,当desktopPreviewParam.desktopType为0时,该值有效) |
startLocalAudio(highPriority)
【desc】Turn on Local Audio(开启本地音频)
Parameters:
| Name | Type | Description |
|---|---|---|
highPriority |
Number | High flow mark,the range of 1 to 100,1 indicates the lowest priority, and 100 indicates the highest priority. (高优流标识,取值范围是1到100,1为最低优先级,100为最高优先级) |
startLocalPreview(previewParam, mode)
【desc】Open local video(打开本地视频)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
previewParam |
Object | (本地视频预览参数对象)
Properties
|
||||||||||||||||||||||||
mode |
Number | 0 - contain;1 - covert; 2 - fill;(0:保持视频比例;1:使视频适应窗口尺寸-裁剪;2:使视频适应窗口尺寸——拉伸) |
startLocalPreviewTest(previewParam)
【desc】Start debugging the Camera(开始调试摄像头)
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
previewParam |
Object | (本地视频预览参数对象)
Properties
|
startLocalStream(previewParam)
【desc】Start collecting and publishing local streams(开始本地流的采集和发布)
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
previewParam |
Object | (本地视频预览参数对象)
Properties
|
startLocalVideoRender(view, mode)
【desc】Start local video rendering(开始本地视频渲染)
Parameters:
| Name | Type | Description |
|---|---|---|
view |
div | the view to render(渲染视频的窗口) |
mode |
Number | 0 - contain;1 - covert; 2 - fill;(0:保持视频比例;1:使视频适应窗口尺寸-裁剪;2:使视频适应窗口尺寸——拉伸) |
startPlayoutTest(path, cb)
【desc】Start debugging the speaker(开始调试扬声器)
Parameters:
| Name | Type | Description |
|---|---|---|
path |
string | wave file path(音频文件路径) |
cb |
function | The format of the cb is function (volume, code){ //volume and code is number } |
startRecordingTest(cb)
【desc】Start debugging the microphone(开始调试麦克风)
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function | Rewind the volume of the microphone(回调麦克风的音量) The format of the cb is function (volume){ //volume is number } |
startRemoteDesktopRender(streamId, view, mode)
【desc】Start to render remote desktop video(开启远程桌面视频渲染)
Parameters:
| Name | Type | Description |
|---|---|---|
streamId |
string | The audio stream ID of the participant(远程流ID) |
view |
div | the view to render(渲染视频的窗口) |
mode |
Number | 0 - contain;1 - covert; 2 - fill;(0:保持视频比例;1:使视频适应窗口尺寸-裁剪;2:使视频适应窗口尺寸——拉伸) |
startRemoteDesktopStream(remoteDesktopPreviewParam)
【desc】Open remote desktop video steam(开启远程桌面视频流)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
remoteDesktopPreviewParam |
Object | Parameters required to start desktop sharing video(远程桌面视频参数对象)
Properties
|
startRemoteDesktopView(remoteDesktopPreviewParam, mode)
【desc】Open remote desktop to share video(开启远程桌面视频)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
remoteDesktopPreviewParam |
Object | Parameters required to start desktop sharing video(远程桌面视频参数对象)
Properties
|
||||||||||||||||||||||||||||||
mode |
Number | 0 - contain;1 - covert; 2 - fill;(0:保持视频比例;1:使视频适应窗口尺寸-裁剪;2:使视频适应窗口尺寸——拉伸) |
startRemoteStream(remoteParam)
【desc】Enable the collection and publishing of remote video streams(开启远程视频流的采集和发布)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
remoteParam |
Object | Open remote user video(打开远程用户视频对象)
Properties
|
startRemoteVideoRender(streamId, view, mode)
【desc】Enable rendering of remote video streams(开启远程视频流的渲染)
Parameters:
| Name | Type | Description |
|---|---|---|
streamId |
string | The audio stream ID of the participant(远程流ID) |
view |
div | the view to render(渲染视频的窗口) |
mode |
Number | 0 - contain;1 - covert; 2 - fill;(0:保持视频比例;1:使视频适应窗口尺寸-裁剪;2:使视频适应窗口尺寸——拉伸) |
startRemoteView(remoteParam, mode)
【desc】Open remote user video(打开远程视频)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
remoteParam |
Object | Open remote user video(打开远程用户视频对象)
Properties
|
|||||||||||||||||||||||||||
mode |
Number | 0 - contain;1 - covert; 2 - fill;(0:保持视频比例;1:使视频适应窗口尺寸-裁剪;2:使视频适应窗口尺寸——拉伸) |
startUploadRtcLogs(deviceId, recentDaysCount)
【desc】 Start uploading RTC logs.(启动RTC日志上传)
Parameters:
| Name | Type | Description |
|---|---|---|
deviceId |
string | Device Id.(设备ID) |
recentDaysCount |
Number | Number of days since the current time for uploading logs.(从当前时间起要上传的日志的天数) |
stopDesktopCapturePreview(desktopCapturePreviews)
【desc】Stop remote desktop capture video(停止远程桌面共享预览)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
desktopCapturePreviews |
Object |
Properties
|
stopDesktopCapturePreviewPromise(desktopCapturePreviews) → {Object}
【desc】Stop remote desktop capture video(停止远程桌面共享预览)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
desktopCapturePreviews |
Object |
Properties
|
Returns:
- Return a promise object,0 indicates success and -1 indicates failure.(返回一个Promise对象,0表示成功,-1表示失败)
- Type
- Object
stopDesktopCaptureShare(desktopPreviewParam)
【desc】Stop desktop sharing video(停止远程桌面共享)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
desktopPreviewParam |
Object | Parameters required to turn off the shared screen (远程桌面预览参数对象)
Properties
|
stopLocalAudio()
【desc】Turn off Local Audio(停止本地音频)
stopLocalPreview(view)
【desc】Close local video(停止本地视频)
Parameters:
| Name | Type | Description |
|---|---|---|
view |
div | the view to render(渲染视频的窗口) |
stopLocalPreviewTest(view)
【desc】Stop debugging the Camera(停止调试摄像头)
Parameters:
| Name | Type | Description |
|---|---|---|
view |
div | the view to render(渲染视频的窗口) |
stopLocalScreenAudio()
【desc】Turn off Local Audio(停止本地音频)
stopLocalStream()
【desc】Stop collecting and publishing local streams(停止本地流的采集和发布)
stopLocalVideoRender(view)
【desc】Stop local video rendering(停止本地视频渲染)
Parameters:
| Name | Type | Description |
|---|---|---|
view |
div | the view to render(渲染视频的窗口) |
stopPlayoutTest()
【desc】Stop debugging the speaker(停止调试扬声器)
stopRecordingTest()
【desc】Stop debugging the microphone(停止调试麦克风)
stopRemoteDesktopRender(streamId, view)
【desc】Stop remote desktop render(停止远程桌面视频渲染)
Parameters:
| Name | Type | Description |
|---|---|---|
streamId |
string | The audio stream ID of the participant(远程流ID) |
view |
div | the view to render(渲染视频的窗口) |
stopRemoteDesktopStream(peerId, streamId)
【desc】Stop remote desktop video stream(停止远程桌面视频流)
Parameters:
| Name | Type | Description |
|---|---|---|
peerId |
Number | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
stopRemoteDesktopStreamV2(userId, streamId)
【desc】Stop remote desktop video stream(停止远程桌面视频流)
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
stopRemoteDesktopView(peerId, streamId, view)
【desc】Stop remote desktop video(停止远程桌面视频)
Parameters:
| Name | Type | Description |
|---|---|---|
peerId |
Number | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
view |
div | the view to render(渲染视频的窗口) |
stopRemoteDesktopViewV2(userId, streamId, view)
【desc】Stop remote desktop video(停止远程桌面视频)
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
view |
div | the view to render(渲染视频的窗口) |
stopRemoteStream(peerId, streamId)
【desc】Disable the collection and distribution of remote video streams(关闭远程视频流的采集和发布)
Parameters:
| Name | Type | Description |
|---|---|---|
peerId |
Number | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
stopRemoteStreamV2(userId, streamId)
【desc】Disable the collection and distribution of remote video streams(关闭远程视频流的采集和发布)
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
stopRemoteVideoRender(streamId, view)
【desc】Turn off rendering for remote video streams(关闭远程视频流的渲染)
Parameters:
| Name | Type | Description |
|---|---|---|
streamId |
string | The audio stream ID of the participant(远程流ID) |
view |
div | the view to render(渲染视频的窗口) |
stopRemoteView(peerId, streamId)
【desc】Turn off remote user video streaming(关闭远程视频)
Parameters:
| Name | Type | Description |
|---|---|---|
peerId |
Number | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
stopRemoteViewV2(userId, streamId)
【desc】Turn off remote user video streaming(关闭远程视频)
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
string | The ID of the participant in the meeting(参会者ID) |
streamId |
string | The audio stream ID of the participant(远程流ID) |
subscribeDataStream(literalStreamId)
【desc】subscribe data streams(订阅文字数据流)
Parameters:
| Name | Type | Description |
|---|---|---|
literalStreamId |
string | The literal stream ID (文字流ID) |
subscribeMillionAudio()
【desc】Subscribe to audio.(订阅音频)
uninitEngine()
【desc】Uninit the JRTCEngine(反初始化JRTCEngine)
engine.JRTCEngineUninit();
unInitJAIManager()
unInit JAIManager.(反初始化JAIManager)
unsubscribeDataStream(literalStreamId)
【desc】unsubscribe data streams(取消订阅文字数据流)
Parameters:
| Name | Type | Description |
|---|---|---|
literalStreamId |
string | The literal stream ID (文字流ID) |
unSubscribeMillionAudio()
【desc】Unsubscribe audio.(取消订阅音频)