• 서비스
  • 가격
  • 리소스
  • 기술지원
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

SeatGridView

Introduction

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.
Important:
Use the LiveSeatStore.create factory method to create a LiveSeatStore instance, passing a valid live room ID.
Note:
Seat state updates are delivered through the liveSeatState publisher. Subscribe to it to receive real-time updates of seat data in the room.

Features

Seat Management:Take seat, leave seat, lock seat, unlock seat operations
User Management:Kick user off seat, move user to specified seat
Device Control:Remote control of user's camera and microphone
Event Listening:Listen to seat-related events

Subscribable Data

LiveSeatState fields are described below:
Property
Type
Description
seatList
StateFlow<List<SeatInfo>>
Seat list.
canvas
StateFlow<LiveCanvas>
Canvas information.
speakingUsers
StateFlow<MutableMap<String, Int>>
Speaking users.
avStatistics
StateFlow<List<AVStatistics>>
Audio and video statistics.

API List

Function
Description
Create seat management instance.
Seat event callbacks.
Seat event callbacks.
Take seat.
Leave seat.
Lock seat.
Unlock seat.
Kick user off seat.
Move user.
Open remote camera.
Close remote camera.
Open remote microphone.
Close remote microphone.

Creating Instance

LiveSeatStore.create

Create seat management instance

Observing State and Events

addLiveSeatEventListener

Add seat event listener
abstract fun addLiveSeatEventListener(
listener: LiveSeatListener?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
listener
Required
Listener.

removeLiveSeatEventListener

Remove seat event listener
abstract fun removeLiveSeatEventListener(
listener: LiveSeatListener?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
listener
Required
Listener.

Seat Operations

takeSeat

Take seat
abstract fun takeSeat(
seatIndex: Int,
completion: CompletionHandler?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
seatIndex
Int
Required
Seat index.
completion
Required
Completion callback.

leaveSeat

Leave seat
abstract fun leaveSeat(completion: CompletionHandler?)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
completion
Required
Completion callback.

lockSeat

Lock seat
abstract fun lockSeat(
seatIndex: Int,
completion: CompletionHandler?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
seatIndex
Int
Required
Seat index.
completion
Required
Completion callback.

unlockSeat

Unlock seat
abstract fun unlockSeat(
seatIndex: Int,
completion: CompletionHandler?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
seatIndex
Int
Required
Seat index.
completion
Required
Completion callback.

User Management

kickUserOutOfSeat

Kick user off seat
abstract fun kickUserOutOfSeat(
userID: String?,
completion: CompletionHandler?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
userID
String?
Required
User ID.
completion
Required
Completion callback.

moveUserToSeat

Move user to seat
abstract fun moveUserToSeat(
userID: String?,
targetIndex: Int,
policy: MoveSeatPolicy? = MoveSeatPolicy.ABORT_WHEN_OCCUPIED,
completion: CompletionHandler?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
userID
String?
Required
User ID.
targetIndex
Int
Required
Target seat index.
policy
Required
Move policy.
completion
Required
Completion callback.

Remote Device Control

openRemoteCamera

Open remote camera
abstract fun openRemoteCamera(
userID: String?,
policy: DeviceControlPolicy,
completion: CompletionHandler?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
userID
String?
Required
User ID.
policy
Required
Device control policy.
completion
Required
Completion callback.

closeRemoteCamera

Close remote camera
abstract fun closeRemoteCamera(
userID: String?,
completion: CompletionHandler?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
userID
String?
Required
User ID.
completion
Required
Completion callback.

openRemoteMicrophone

Open remote microphone
abstract fun openRemoteMicrophone(
userID: String?,
policy: DeviceControlPolicy,
completion: CompletionHandler?
)
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
userID
String?
Required
User ID.
policy
Required
Device control policy.
completion
Required
Completion callback.

closeRemoteMicrophone

Close remote microphone
abstract fun closeRemoteMicrophone(
userID: String?,
completion: CompletionHandler?
)

internal val hasAudioStreamUserList: MutableSet<String> = mutableSetOf()
internal val hasVideoStreamUserList: MutableSet<String> = mutableSetOf()
Version
Supported since version 3.5.
Parameters
Parameter
Type
Required
Description
userID
String?
Required
User ID.
completion
Required
Completion callback.

Data Structures

MoveSeatPolicy

Move seat policy
Enum Value
Description
ABORT_WHEN_OCCUPIED
Abort when occupied.
FORCE_REPLACE
Force replace.
SWAP_POSITION
Swap position.

DeviceControlPolicy

Device control policy
Enum Value
Description
UNLOCK_ONLY
Unlock only.

SuspendStatus

User suspend status
Enum Value
Description
NONE
Not suspended.
IN_BACKGROUND
User suspended in background.
IN_CALLING
User is on a phone call.

LiveSeatListener

Seat related callback events.
Methods
Method
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.

SeatUserInfo

Seat user information
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
Boolean
Whether microphone can be opened.
cameraStatus
Camera status.
allowOpenCamera
Boolean
Whether camera can be opened.
userSuspendStatus
User suspend status.

RegionInfo

Seat view coordinate information
Property
Type
Description
x
Int
X coordinate.
y
Int
Y coordinate.
w
Int
Width.
h
Int
Height.
zorder
Int
Z-order.

AVStatistics

Audio and video statistics information
Property
Type
Description
userID
String
User ID.
videoBitrate
Int
Local video bitrate.
videoWidth
Int
Local video width.
videoHeight
Int
Local video height.
frameRate
Int
Local video frame rate.
audioSampleRate
Int
Audio sample rate.
audioBitrate
Int
Audio bitrate.

SeatInfo

Seat information
Property
Type
Description
index
Int
Seat index.
isLocked
Boolean
Whether locked.
userInfo
User information.
region
Region information.

LiveCanvas

Live canvas
Property
Type
Description
w
Int
Width.
h
Int
Height.
templateID
Int
Template ID.

LiveSeatState

Seat state data provided by LiveSeatStore.
Property
Type
Description
seatList
StateFlow<List<SeatInfo>>
Seat list.
canvas
StateFlow<LiveCanvas>
Canvas information.
speakingUsers
StateFlow<MutableMap<String, Int>>
Speaking users.
avStatistics
StateFlow<List<AVStatistics>>
Audio and video statistics.