NERoomContext
@objcMembers
public class NERoomContext : NSObject
extension NERoomContext: NERoomNotificationCenterProtocol
房间上下文
-
模板
Declaration
Swift
public var template: NERoomTemplate!
-
本端成员(自己)
Declaration
Swift
public var localMember: NERoomMember!
-
远端成员列表 (不包含本端)
Declaration
Swift
public var remoteMembers: [NERoomMember] { get }
-
正在SIP外呼邀请中的成员
Declaration
Swift
public var inSIPInvitingMembers: [NERoomMember] { get }
-
正在App外呼邀请中的成员
Declaration
Swift
public var inAppInvitingMembers: [NERoomMember] { get }
-
聊天控制器
Declaration
Swift
public var chatController: NERoomChatController!
-
白板控制器
Declaration
Swift
public var whiteboardController: NERoomWhiteboardController!
-
批注控制器
Declaration
Swift
public var annotationController: NERoomAnnotationController!
-
音视频控制器
Declaration
Swift
public var rtcController: NERoomRtcController!
-
直播控制器
Declaration
Swift
public var liveController: NERoomLiveController!
-
麦位控制器
Declaration
Swift
public var seatController: NERoomSeatController!
-
等候室控制器
Declaration
Swift
public var waitingRoomController: NEWaitingRoomController!
-
SIP外呼控制器
Declaration
Swift
public var sipController: NERoomSIPController!
-
app外呼控制器
Declaration
Swift
public var appInviteController: NERoomAppInviteController!
-
查询当前用户是否在等候室中
Declaration
Swift
public var isInWaitingRoom: Bool { get }
-
房间密码
Declaration
Swift
public var password: String?
-
直播密码
Declaration
Swift
public var livePassword: String?
-
房间剩余时间 秒/单位
Declaration
Swift
public var remainingSeconds: Int
-
房间最大人数
Declaration
Swift
public var maxMembers: Int
-
房间名称
Declaration
Swift
public var roomName: String!
-
房间信息
Declaration
Swift
public var roomExt: String?
-
房间ID
Declaration
Swift
public var roomUuid: String!
-
房间当前锁定状态
Declaration
Swift
public var isRoomLocked: Bool
-
批注是否可用
Declaration
Swift
public var isAnnotationEnabled: Bool
-
房间是否正在云录制
Declaration
Swift
public var isCloudRecording: Bool
-
房间是否开启了黑名单
Declaration
Swift
public var isRoomBlackListEnabled: Bool { get set }
-
房间属性
Declaration
Swift
public var roomProperties: [String : String] { get }
-
音视频开始时间
Declaration
Swift
public var rtcStartTime: Int64 { get }
-
房间SIP号
Declaration
Swift
public var sipCid: String? { get }
-
Declaration
Swift
public var isRoomChatBanned: Bool { get }
-
Declaration
Swift
public var isRoomAudioBanned: Bool { get }
-
Declaration
Swift
public var isRoomVideoBanned: Bool { get }
-
用于在房间管理员授权成员加入后重新加入房间 如等候室内的成员在被准入后可通过该接口重新加入当前房间。
Declaration
Swift
public func rejoinAfterAdmittedToRoom(callback: NECallback<AnyObject>?)
Parameters
callback
回调 如果加入失败或成员未被授权加入,则会回调失败。
-
更新房间属性
Declaration
Swift
public func updateRoomProperty(key: String, value: String, associatedUserUuid: String? = nil, callback: NECallback<AnyObject>? = nil)
Parameters
key
属性名
value
属性值
associatedUuid
声明该属性关联的用户uuid,如果该用户退出房间,该属性会被删除
callback
回调
-
删除房间属性
Declaration
Swift
public func deleteRoomProperty(key: String, callback: NECallback<AnyObject>? = nil)
Parameters
key
属性名
callback
回调
-
更新成员属性
Declaration
Swift
public func updateMemberProperty(userUuid: String, key: String, value: String, callback: NECallback<AnyObject>? = nil)
Parameters
userUuid
成员ID
key
属性名
value
属性值
callback
回调
-
删除成员属性
Declaration
Swift
public func deleteMemberProperty(userUuid: String, key: String, callback: NECallback<AnyObject>? = nil)
Parameters
userUuid
成员ID
key
属性名
callback
回调
-
改变成员角色
Declaration
Swift
public func changeMemberRole(userUuid: String, role: String, callback: NECallback<AnyObject>? = nil)
Parameters
userUuid
成员ID
role
角色名
callback
回调
-
批量修改成员角色,仅房主可用
Declaration
Swift
public func changeMembersRole(userRoleMap: [String : String], callback: NECallback<AnyObject>? = nil)
Parameters
userRoleMap
成员账号-角色映射表,{“userUuid1”: “host”}
callback
回调
-
将自身当前角色转移给 用户ID对应的用户,自身会回复默认的房间角色
只有授权角色才能执行该操作
Declaration
Swift
public func handOverMyRole(userUuid: String, callback: NECallback<AnyObject>? = nil)
Parameters
userUuid
用户ID
callback
回调
-
将自身当前角色转移给 用户ID对应的用户,自身会回复默认的房间角色
只有授权角色才能执行该操作
Declaration
Swift
public func handOverMyRole(userUuid: String, resign: Bool, callback: NECallback<AnyObject>? = nil)
Parameters
userUuid
用户ID
callback
回调
-
修改昵称
Declaration
Swift
public func changeMyName(userName: String, callback: NECallback<AnyObject>? = nil)
Parameters
userName
昵称
callback
回调
-
修改成员昵称
Declaration
Swift
public func changeMemberName(userUuid: String, userName: String, callback: NECallback<AnyObject>? = nil)
Parameters
userUuid
成员ID
userName
昵称
callback
回调
-
修改自己的扩展信息
Declaration
Swift
public func changeMyExt(ext: String, callback: NECallback<AnyObject>? = nil)
Parameters
userName
扩展信息
callback
回调
-
通过成员Id 获取成员对象
Declaration
Swift
public func getMember(uuid: String) -> NERoomMember?
Parameters
uuid
成员Id
Return Value
成员对象
-
房间踢人
Declaration
Swift
public func kickMemberOut(userUuid: String, toBlacklist: Bool, callback: NECallback<AnyObject>? = nil)
Parameters
userUuid
成员ID
toBlacklist
是否加入黑名单
callback
回调
-
开启黑名单
Declaration
Swift
public func enableRoomBlacklist(enable: Bool, callback: NECallback<AnyObject>? = nil)
Parameters
enable
是否开启
callback
回调
-
离开房间
Declaration
Swift
public func leaveRoom(callback: NECallback<AnyObject>? = nil)
Parameters
callback
回调
-
结束房间
Declaration
Swift
public func endRoom(isForce: Bool, callback: NECallback<AnyObject>? = nil)
Parameters
isForce
是否成功失败都销毁本地
roomUuid
房间ID
-
锁定房间. 锁定后成员无法加入
Declaration
Swift
public func lockRoom(callback: NECallback<AnyObject>? = nil)
Parameters
callback
回到
-
解除锁定房间. 解除锁定后成员可以加入该房间
Declaration
Swift
public func unlockRoom(callback: NECallback<AnyObject>? = nil)
Parameters
callback
回调
-
修改房间名称
Declaration
Swift
public func changeRoomName(roomName: String, callback: NECallback<AnyObject>? = nil)
Parameters
roomName
房间名称
callback
回调
-
修改房间扩展信息
Declaration
Swift
public func changeRoomExt(roomExt: String, callback: NECallback<AnyObject>? = nil)
Parameters
roomInfo
房间扩展信息
callback
回调
-
开启云录制
Declaration
Swift
public func startCloudRecord(callback: NECallback<AnyObject>? = nil)
-
结束云录制
Declaration
Swift
public func stopCloudRecord(callback: NECallback<AnyObject>? = nil)
-
添加监听
Declaration
Swift
public func addRoomListener(listener: NERoomListener)
Parameters
listener
监听器
-
删除监听
Declaration
Swift
public func removeRoomListener(listener: NERoomListener)
Parameters
listener
监听器
-
添加Rtc统计数据监听
Declaration
Swift
public func addRtcStatsListener(listener: NERtcStatsListener)
Parameters
listener
监听器
-
移除Rtc统计数据监听
Declaration
Swift
public func removeRtcStatsListener(listener: NERtcStatsListener)
Parameters
listener
监听器
-
设置房间所有成员禁用聊天功能 @param notifyExt 扩展信息 @param callback 回调
相关回调:调用成功后,会立即触发[NERoomListener.onRoomChatBanStateChanged]回调Declaration
Swift
public func banRoomChat(notifyExt: String?, callback: NECallback<AnyObject>? = nil)
-
设置房间内所有成员音频禁言 @param notifyExt 扩展信息 @param callback 回调
相关回调:禁用音频会立即触发[NERoomListener.onRoomAudioBanStatedChanged]回调和[NERoomListener.onMembersAudioMuteChanged]回调Declaration
Swift
public func banRoomAudio(notifyExt: String?, callback: NECallback<AnyObject>? = nil)
-
设置房间内所有成员视频禁言 @param notifyExt 扩展信息 @param callback 回调
相关回调:禁用视频会立即触发[NERoomListener.onRoomVideoBanStatedChanged]回调和[NERoomListener.onMembersVideoMuteChanged]回调Declaration
Swift
public func banRoomVideo(notifyExt: String?, callback: NECallback<AnyObject>? = nil)
-
取消房间所有成员禁用聊天功能 @param notifyExt 扩展信息 @param callback 回调
相关回调:调用成功后,会立即触发[NERoomListener.onRoomChatBanStateChanged]回调Declaration
Swift
public func unbanRoomChat(notifyExt: String?, callback: NECallback<AnyObject>? = nil)
-
取消房间内所有成员音频禁言 @param notifyExt 扩展信息 @param callback 回调
相关回调:禁用音频会立即触发[NERoomListener.onRoomAudioBanStatedChanged]回调和[NERoomListener.onMembersAudioMuteChanged]回调Declaration
Swift
public func unbanRoomAudio(notifyExt: String?, callback: NECallback<AnyObject>? = nil)
-
取消房间内所有成员视频禁言 @param notifyExt 扩展信息 @param callback 回调
相关回调:禁用视频会立即触发[NERoomListener.onRoomVideoBanStatedChanged]回调和[NERoomListener.onMembersVideoMuteChanged]回调Declaration
Swift
public func unbanRoomVideo(notifyExt: String?, callback: NECallback<AnyObject>? = nil)
-
拉黑成员 @param userUuid 用户id @param notifyExt 扩展信息 @param callback 回调
相关回调:调用成功后,会立即触发[NERoomListener.onMemberAddToBlacklist]回调Declaration
Swift
public func addToBlacklist(userUuid: String, notifyExt: String?, callback: NECallback<AnyObject>? = nil)
-
取消拉黑成员 @param userUuid 用户id @param notifyExt 扩展信息 @param callback 回调
相关回调:调用成功后,会立即触发[NERoomListener.onMemberRemoveFromBlacklist]回调Declaration
Swift
public func removeFromBlacklist(userUuid: String, notifyExt: String?, callback: NECallback<AnyObject>? = nil)
-
获取房间内黑名单列表 @param pageNum 页码,从1开始 @param callback 每页数据大小 @param callback 回调
Declaration
Swift
public func getBlacklist(pageNum: Int, pageSize: Int, callback: NECallback<[NERoomBlacklistMember]>? = nil)