NERoomContext
@objcMembers
public class NERoomContext : NSObject
房间上下文
-
模板
Declaration
Swift
public var template: NERoomTemplate!
-
本端成员(自己)
Declaration
Swift
public var localMember: NERoomMember!
-
远端成员列表 (不包含本端)
Declaration
Swift
public var remoteMembers: [NERoomMember]
-
聊天控制器
Declaration
Swift
public var chatController: NERoomChatController!
-
白板控制器
Declaration
Swift
public var whiteboardController: NERoomWhiteboardController!
-
音视频控制器
Declaration
Swift
public var rtcController: NERoomRtcController!
-
直播控制器
Declaration
Swift
public var liveController: NERoomLiveController!
-
房间密码
Declaration
Swift
public var password: String?
-
直播密码
Declaration
Swift
public var livePassword: String?
-
房间名称
Declaration
Swift
public var roomName: String!
-
房间ID
Declaration
Swift
public var roomUuid: String!
-
房间当前锁定状态
Declaration
Swift
public var isRoomLocked: Bool
-
房间属性
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 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
回调
-
将自身当前角色转移给 用户ID对应的用户,自身会回复默认的房间角色
只有授权角色才能执行该操作
Declaration
Swift
public func handOverMyRole(userUuid: String, callback: NECallback<AnyObject>?)
Parameters
userUuid
用户ID
callback
回调
-
修改昵称
Declaration
Swift
public func changeMyName(userName: String, callback: NECallback<AnyObject>?)
Parameters
userName
昵称
callback
回调
-
通过成员Id 获取成员对象
Declaration
Swift
public func getMember(uuid: String) -> NERoomMember?
Parameters
uuid
成员Id
Return Value
成员对象
-
房间踢人
Declaration
Swift
public func kickMemberOut(userUuid: String, callback: NECallback<AnyObject>? = nil)
Parameters
userUuid
成员ID
callback
回调
-
离开房间
Declaration
Swift
public func leaveRoom(callback: NECallback<AnyObject>? = nil)
Parameters
callback
回调
-
结束房间
Declaration
Swift
public func endRoom(callback: NECallback<AnyObject>? = nil)
Parameters
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 addRoomListener(listener: NERoomListener)
Parameters
listener
监听器
-
删除监听
Declaration
Swift
public func removeRoomListener(listener: NERoomListener)
Parameters
listener
监听器