LiveSeatStore provides a complete set of seat management APIs, including taking seat, leaving seat, locking seat, unlocking seat, kicking user off seat, remote device control, etc. Through this class, seat management functionality can be implemented in the live room.LiveSeatStore instance, passing a valid live room ID.Property | Type | Description |
seatList | Seat list. | |
canvas | Canvas information. | |
speakingUsers | [String: Int] | Speaking users. |
avStatistics | Audio and video statistics. |
Function | Description |
Create seat management instance. | |
Seat event publisher. | |
Take seat. | |
Leave seat. | |
Lock seat. | |
Unlock seat. | |
Kick user off seat. | |
Move user. | |
Set a featured host. | |
Revoke a featured host. | |
Open remote camera. | |
Close remote camera. | |
Open remote microphone. | |
Close remote microphone. |
public static func create(liveID: String) -> LiveSeatStore {let store: LiveSeatStoreImpl = StoreFactory.shared.getStore(roomID: liveID)return store}
Parameter | Type | Description |
liveID | String | Live room ID. |
public func takeSeat(seatIndex: Int,completion: CompletionClosure?){fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
seatIndex | Int | Seat index. |
completion | Completion callback. |
public func leaveSeat(completion: CompletionClosure? = nil) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
completion | Completion callback. |
public func lockSeat(seatIndex: Int,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
seatIndex | Int | Seat index. |
completion | Completion callback. |
public func unlockSeat(seatIndex: Int,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
seatIndex | Int | Seat index. |
completion | Completion callback. |
public func kickUserOutOfSeat(userID: String,completion: CompletionClosure?){fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID. |
completion | Completion callback. |
public func moveUserToSeat(userID: String,targetIndex: Int,policy: MoveSeatPolicy?,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID. |
targetIndex | Int | Target seat index. |
policy | Move policy. | |
completion | Completion callback. |
public func setFeaturedHost(userID: String,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID. |
completion | Completion callback. |
public func revokeFeaturedHost(userID: String,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID. |
completion | Completion callback. |
public func openRemoteCamera(userID: String,policy: DeviceControlPolicy,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID. |
policy | Device control policy. | |
completion | Completion callback. |
public func closeRemoteCamera(userID: String,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID. |
completion | Completion callback. |
public func openRemoteMicrophone(userID: String,policy: DeviceControlPolicy,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID. |
policy | Device control policy. | |
completion | Completion callback. |
public func closeRemoteMicrophone(userID: String,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID. |
completion | Completion callback. |
Enum Value | Description |
abortWhenOccupied | Abort when occupied. |
forceReplace | Force replace. |
swapPosition | Swap position. |
Enum Value | Description |
unlockOnly | Unlock only. |
Enum Value | Description |
none | Not suspended. |
inBackground | User suspended in background. |
inCalling | User is on a phone call. |
Enum Value | Description |
onLocalCameraOpenedByAdmin | Triggered when the local camera is opened by an admin. |
onLocalCameraClosedByAdmin | Triggered when the local camera is closed by an admin. |
onLocalMicrophoneOpenedByAdmin | Triggered when the local microphone is opened by an admin. |
onLocalMicrophoneClosedByAdmin | Triggered when the local microphone is closed by an admin. |
Property | Type | Description |
userID | String | User ID. |
userName | String | User name. |
avatarURL | String | Avatar URL. |
role | User role. | |
liveID | String | Live room ID. |
microphoneStatus | Microphone status. | |
allowOpenMicrophone | Bool | Whether microphone can be opened. |
cameraStatus | Camera status. | |
allowOpenCamera | Bool | Whether camera can be opened. |
userSuspendStatus | User suspend status. |
Property | Type | Description |
x | CGFloat | X coordinate. |
y | CGFloat | Y coordinate. |
w | CGFloat | Width. |
h | CGFloat | Height. |
zorder | Int | Z-order. |
Property | Type | Description |
userID | String | User ID. |
videoBitrate | UInt | Local video bitrate. |
videoWidth | CGFloat | Local video width. |
videoHeight | CGFloat | Local video height. |
frameRate | UInt | Local video frame rate. |
audioSampleRate | UInt | Audio sample rate. |
audioBitrate | UInt | Audio bitrate. |
Property | Type | Description |
index | Int | Seat index. |
isLocked | Bool | Whether locked. |
userInfo | User information. | |
region | Region information. | |
isFeaturedHost | Bool | Whether the user on this seat is currently a featured host. Can only be true in templates that support featured host slots. |
Property | Type | Description |
w | CGFloat | Width. |
h | CGFloat | Height. |
templateID | UInt | Template ID. |
Property | Type | Description |
seatList | Seat list. | |
canvas | Canvas information. | |
speakingUsers | [String: Int] | Speaking users. |
avStatistics | Audio and video statistics. |
フィードバック