new User()
- Description:
用户类
- Since:
- 2018-06-31
Methods
(static) createBoard(width, height, backgroundColor, backgroundImage, outputWidth, outputHeight, title)
- Description:
创建白板
Parameters:
Name | Type | Description |
---|---|---|
width |
int | 白板的渲染宽度 |
height |
int | 白板的渲染高度 |
backgroundColor |
String | 白板的背景色 |
backgroundImage |
String | 白板的背景图访问路径 |
outputWidth |
int | 白板的输出宽度 |
outputHeight |
int | 白板的输出高度 |
title |
String | 白板标题 |
(static) getAudio(microphoneId) → {audio}
- Description:
获取audio对象
Parameters:
Name | Type | Description |
---|---|---|
microphoneId |
string | 麦克风设备ID |
Returns:
audio对象
- Type
- audio
(static) getScreen(screenId) → {screen}
- Description:
获取screen对象
Parameters:
Name | Type | Description |
---|---|---|
screenId |
string | 桌面共桌Id,获取自己时,可以不填 |
Returns:
screen对象
- Type
- screen
(static) getSelfUserPushStreamUrl()
- Description:
获取推流地址,切换摄像头推流地址保持不变。推视频、音频都是同一个地址
(static) getVideo(cameraId) → {video}
- Description:
获取video对象
Parameters:
Name | Type | Description |
---|---|---|
cameraId |
string | 摄像头设备Id |
Returns:
video对象
- Type
- video
(static) getVideo(cameraId) → {video}
- Description:
获取video对象
Parameters:
Name | Type | Description |
---|---|---|
cameraId |
string | 摄像头设备Id |
Returns:
video对象
- Type
- video
(static) remotecmdOpenMicrophone(userId)
- Description:
命令远端用户打开麦克风
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | 远端用户Id |
(static) remotecmdPublishCamera(video)
- Description:
命令远端用户发布某一摄像头视频
Parameters:
Name | Type | Description |
---|---|---|
video |
Obejct | 视频对象 |
(static) remotecmdUnpublishCamera(userId, cameraId)
- Description:
命令远端用户取消发布摄像头视频
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | 用户Id |
cameraId |
String | 摄像头设备Id |
(static) updateUserData(userData)
- Description:
更新用户扩展内容
Parameters:
Name | Type | Description |
---|---|---|
userData |
string | 用户扩展内容 |
(static) updateUserName(userName)
- Description:
更新用户名称
Parameters:
Name | Type | Description |
---|---|---|
userName |
string | 用户名称 |
Type Definitions
addCallback()
- Description:
用户级别的回调设置
Example
user.addCallback(app.data.avdSDK.Enum.UserCallback.microphone_status_notify, onMicrophoneStatusNotify);
user.addCallback(app.data.avdSDK.Enum.UserCallback.camera_status_notify, onCameraStatusNotify);
user.addCallback(app.data.avdSDK.Enum.UserCallback.publish_camera_notify, onPublishCameraNotify);
user.addCallback(app.data.avdSDK.Enum.UserCallback.unpublish_camera_notify, onUnpublishCameraNotify);
user.addCallback(app.data.avdSDK.Enum.UserCallback.subscrible_camera_result, onSubscribleCameraResult);
user.addCallback(app.data.avdSDK.Enum.UserCallback.unsubscrible_camera_result, onUnsubscribleCameraResult);
user.addCallback(app.data.avdSDK.Enum.UserCallback.subscrible_microphone_result, onSubscribleMicrophoneResult);
user.addCallback(app.data.avdSDK.Enum.UserCallback.unsubscrible_microphone_result, onUnsubscribleMicrophoneResult);
user.addCallback(app.data.avdSDK.Enum.UserCallback.publish_screen_notify, onPublishScreenNotify);
user.addCallback(app.data.avdSDK.Enum.UserCallback.unpublish_screen_notify, onUnpublishScreenNotify);
user.addCallback(app.data.avdSDK.Enum.UserCallback.subscrible_screen_result, onSubscribleScreenResult);
user.addCallback(app.data.avdSDK.Enum.UserCallback.unsubscrible_screen_result, onUnsubscribleScreenResult);
user.addCallback(app.data.avdSDK.Enum.UserCallback.subscrible_screen_audio_result, onSubscribleScreenAudioResult);
user.addCallback(app.data.avdSDK.Enum.UserCallback.unsubscrible_screen_audio_result, onUnsubscribleScreenAudioResult);