new Room()
- Description:
房间类
- Since:
- 2018-06-31
Methods
(static) closeRoom(userId)
- Description:
关闭房间
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | 关闭房间的操作用户ID |
(static) getAppData(key)
- Description:
获得房间应用扩展字段信息
Parameters:
Name | Type | Description |
---|---|---|
key |
String | key值 |
(static) getOwnerId() → {string}
- Description:
返回会议建创者
Returns:
会议建创者
- Type
- string
(static) getParticipants()
- Description:
返回参会者数组
(static) getUser(用户Id) → {user}
- Description:
通过用户ID获得用户对象
Parameters:
Name | Type | Description |
---|---|---|
用户Id |
String |
Returns:
用户对象
- Type
- user
(static) getUsersNumber() → {num}
- Description:
获取房间用户人数
Returns:
房间用户人数
- Type
- num
(static) hasUser(userId)
- Description:
通过用户ID,判断用户对象是否存在。
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | 用户的Id |
(static) join(userId, userName, userData, password)
- Description:
加会
Parameters:
Name | Type | Description |
---|---|---|
userId |
Object | 用户的Id |
userName |
Object | 用户名 |
userData |
Object | 用户扩展字段 |
password |
Object | 会议密码或主持人密码 |
(static) kickoffUser(reason, userId)
- Description:
踢人
Parameters:
Name | Type | Description |
---|---|---|
reason |
int | 踢人原因 |
userId |
String | 被踢用户id |
(static) leave(reason, kickoffOpt)
- Description:
退会
Parameters:
Name | Type | Description |
---|---|---|
reason |
int | 退会原因 |
kickoffOpt |
boolean | 退会类型: true:被踢退会,false:主动退会,可以不填 |
(static) sendPrivateData(dataBinary, userId)
- Description:
发送私有透明通送
Parameters:
Name | Type | Description |
---|---|---|
dataBinary |
Object | - ArrayBinary类型的内容 注: ArrayBinary : 二进制数据的原始缓冲区,该缓冲区用于存储各种类型化数组的数据 |
userId |
String | 接受透明通送内容的用户ID |
(static) sendPrivateMessage(message, userId)
- Description:
发送私聊消息
Parameters:
Name | Type | Description |
---|---|---|
message |
String | 消息内容 |
userId |
String | 接受消息的用户ID |
(static) sendPublicData(dataBinary)
- Description:
发送公有透明通送
Parameters:
Name | Type | Description |
---|---|---|
dataBinary |
Object | - ArrayBinary类型的内容 注: ArrayBinary : 二进制数据的原始缓冲区,该缓冲区用于存储各种类型化数组的数据 |
(static) sendPublicMessage(message)
- Description:
发送公聊消息
Parameters:
Name | Type | Description |
---|---|---|
message |
String | 消息内容 |
(static) updateAppData(key, value)
- Description:
更新房间应用扩展字段
Parameters:
Name | Type | Description |
---|---|---|
key |
Object | - key值 |
value |
Object | - value值 |
Type Definitions
addCallback()
- Description:
房间级别的回调设置
Example
room.addCallback(app.data.avdSDK.Enum.RoomCallback.connection_status, onConnectionStatus);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.user_join_notify, onUserJoinNotify);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.user_leave_notify, onUserLeaveNotify);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.leave_indication, onLeaveIndication);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.close_room_result, onCloseRoomResult);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.close_room_notify, onCloseRoomNotify);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.app_data_notify, onAppdataNotify);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.user_data_notify, onUserDataNotify);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.user_name_notify, onUserNameNotify);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.public_message, onPublicMessage);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.private_message, onPrivateMessage);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.public_data, onPublicData);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.private_data, onPrivateData);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.mediaplay_started_notify, onMediaPlayStartedNotify);
room.addCallback(app.data.avdSDK.Enum.RoomCallback.mediaplay_stoped_notify, onMediaPlayStopedNotify);