BaxcloudLiveStreamingSeatsController class

Controller for managing live streaming with seats and co-hosts Supports multi-seat video/voice streaming and co-host management

Inheritance

Properties

cameraLocalState bool
Camera local state (equivalent to ZegoUIKit's camera.localState) Returns true if camera is on, false if off
no setter
coHost BaxcloudCoHostInvitationController?
Get co-host controller Provides access to all co-host invitation and request functions
no setter
coHostIds List<String>
Get co-host IDs
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hostId String?
Get host ID
no setter
isAudioEnabled bool
Whether audio is enabled
no setter
isCoHost bool
Check if current user is co-host
no setter
isConnected bool
Whether the room is connected
no setter
isConnecting bool
Whether the room is currently connecting
no setter
isFrontCamera bool
Whether using front camera
no setter
isHD bool
Whether HD quality is enabled
no setter
isHost bool
Check if current user is host
no setter
isMirrored bool
Whether video is mirrored
no setter
isPublishing bool
Whether publishing media
no setter
isRecording bool
Whether recording is active
no setter
isVideoEnabled bool
Whether video is enabled
no setter
localAudioTrack LocalAudioTrack?
Get local audio track
no setter
localVideoTrack LocalVideoTrack?
Get local video track
no setter
maxSeats int
Get max seats
no setter
microphoneLocalState bool
Microphone local state (equivalent to ZegoUIKit's microphone.localState) Returns true if microphone is on, false if off
no setter
onConnectionError ↔ dynamic Function(Object)?
Callback when a connection error occurs
getter/setter pair
onConnectionQualityChanged ↔ dynamic Function(BaxcloudConnectionQuality, BaxcloudConnectionQuality)?
Callback when connection quality changes
getter/setter pair
onParticipantConnected ↔ dynamic Function(RemoteParticipant)?
Callback when a participant connects
getter/setter pair
onParticipantDisconnected ↔ dynamic Function(RemoteParticipant)?
Callback when a participant disconnects
getter/setter pair
onPublishingError ↔ dynamic Function(Object)?
Callback when a publishing error occurs
getter/setter pair
onRoomDisconnected ↔ dynamic Function(BaxcloudDisconnectReason?)?
Callback when room disconnects
getter/setter pair
onRoomParticipantsUpdated ↔ dynamic Function(List<RemoteParticipant>)?
Callback when room participants are updated (count or list changes) Provides the current list of remote participants
getter/setter pair
onTrackError ↔ dynamic Function(Object, String)?
Callback when a track error occurs
getter/setter pair
onTrackSubscribed ↔ dynamic Function(RemoteTrackPublication<RemoteTrack>, RemoteParticipant)?
Callback when a track is subscribed
getter/setter pair
onTrackUnsubscribed ↔ dynamic Function(RemoteTrackPublication<RemoteTrack>, RemoteParticipant)?
Callback when a track is unsubscribed
getter/setter pair
onUserAudioDisabled ↔ dynamic Function(BaxcloudUIKITUser)?
Callback when a user's audio is disabled (using BaxcloudUIKITUser)
getter/setter pair
onUserAudioEnabled ↔ dynamic Function(BaxcloudUIKITUser)?
Callback when a user's audio is enabled (using BaxcloudUIKITUser)
getter/setter pair
onUserJoined ↔ dynamic Function(BaxcloudUIKITUser)?
Callback when a user joins (using BaxcloudUIKITUser)
getter/setter pair
onUserKickedout ↔ dynamic Function(BaxcloudUIKITUser)?
Callback when user is kicked out from the room
getter/setter pair
onUserLeft ↔ dynamic Function(BaxcloudUIKITUser)?
Callback when a user leaves (using BaxcloudUIKITUser)
getter/setter pair
onUserVideoDisabled ↔ dynamic Function(BaxcloudUIKITUser)?
Callback when a user's video is disabled (using BaxcloudUIKITUser)
getter/setter pair
onUserVideoEnabled ↔ dynamic Function(BaxcloudUIKITUser)?
Callback when a user's video is enabled (using BaxcloudUIKITUser)
getter/setter pair
participantsInSeats List<SeatInfo>
Get participants in seats
no setter
publishers List<RemoteParticipant>
Get list of publishers (participants publishing video or audio)
no setter
remoteParticipants List<RemoteParticipant>
Get all remote participants
no setter
room Room?
Get current room
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seats Map<String, SeatInfo>
Get all seats
no setter
streamingMode StreamingMode
Current streaming mode
no setter
viewers List<RemoteParticipant>
Get list of viewers (non-publishing participants)
no setter

Methods

addCoHost(String participantId) Future<bool>
Add co-host
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
assignSeat(String participantId, int seatIndex) Future<bool>
Assign seat to participant (host/co-host only)
connectAndStart({required String roomName, required StreamingMode streamingMode, String? userId, String? username, String? avatarUrl, bool enableVideo = true, bool enableAudio = true, bool viewerMode = false, Map<String, dynamic>? metadata, String? token, int maxSeats = 9, bool isHost = false, String? hostUserId, CameraPosition? cameraPosition, int? maxParticipants, bool canJoinWithNoHost = false}) Future<void>
Connect to a room and start streaming ServerUrl is automatically fetched from server viewerMode - If true, connects as viewer without publishing (default: false) canJoinWithNoHost - If false, server will check if host is present before generating token (default: false)
disableParticipantVideo(String participantId) Future<void>
Disable video for a remote participant (host/co-host only) Uses server-side API to mute participant's video track
disconnect() Future<void>
Disconnect from room
dispose() → void
Discards any resources used by the object.
override
initialize(BaxCloudClient client, {BaxcloudSignalingController? signalingController}) → void
Initialize the controller with BaxCloud client
inviteCoHost(String participantId) Future<void>
Invite a participant to become a co-host
inviteToSeat(String participantId) Future<void>
Invite a participant to join a seat
leaveSeat() Future<void>
Leave seat (for current user)
muteLocalAudio() Future<void>
Mute local audio
muteLocalVideo() Future<void>
Mute local video
muteParticipant(String participantId) Future<void>
Mute a remote participant (host/co-host only) Uses server-side API to mute participant's audio track
muteRemoteParticipantAudio(String participantId) Future<void>
Mute a remote participant's audio (client-side - stops receiving audio) Note: Remote tracks don't have mute/unmute methods. This method is a placeholder. To actually mute remote participants, use the existing muteParticipant method which uses signaling to request server-side muting.
muteRemoteParticipantVideo(String participantId) Future<void>
Mute a remote participant's video (client-side - stops receiving video) Note: Remote tracks don't have mute/unmute methods. This method is a placeholder. To actually mute remote participants, use the existing disableParticipantVideo method.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeCoHost(String participantId) Future<bool>
Remove co-host
removeFromSeat(String participantId) Future<bool>
Remove participant from seat (host/co-host only)
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeParticipant(String participantId) Future<void>
Remove a participant from the room (host/co-host only) Uses server-side API to remove participant
requestSeat() Future<bool>
Request a seat (for viewers)
respondToInvitation(String fromUserId, bool accepted, {String? invitationType}) Future<void>
Respond to an invitation Uses the new co-host invitation system for co-host invitations
startPublishing({bool enableVideo = true, bool enableAudio = true}) Future<void>
Start publishing media
startRecording() Future<void>
Start recording the live stream Note: This requires server-side recording support The actual recording is handled by the LiveKit server
stopPublishing() Future<void>
Stop publishing media
stopRecording() Future<void>
Stop recording the live stream
switchCamera() Future<void>
Switch camera (front/back) Uses LiveKit's setCameraPosition method for efficient camera switching See: https://docs.livekit.io/reference/client-sdk-flutter/livekit_client/LocalVideoTrackExt/setCameraPosition.html
toggleAudio() Future<void>
Toggle audio on/off
toggleHD() Future<void>
Toggle HD quality Recreates the video track with updated capture resolution and encoding. HD uses the configured quality (or 720p default), non-HD uses 360p.
toggleMirror() → void
Toggle mirror mode
toggleRecording() Future<void>
Toggle recording on/off
toggleVideo() Future<void>
Toggle video on/off
toString() String
A string representation of this object.
inherited
turnOnCamera(bool enabled) Future<void>
Turn camera on/off (equivalent to ZegoUIKit's camera.turnOn) enabled - true to turn on, false to turn off
turnOnMicrophone(bool enabled) Future<void>
Turn microphone on/off (equivalent to ZegoUIKit's microphone.turnOn) enabled - true to turn on, false to turn off
unmuteLocalAudio() Future<void>
Unmute local audio
unmuteLocalVideo() Future<void>
Unmute local video
unmuteRemoteParticipantAudio(String participantId) Future<void>
Unmute a remote participant's audio (client-side - resumes receiving audio) Note: Remote tracks don't have mute/unmute methods. This method is a placeholder.
unmuteRemoteParticipantVideo(String participantId) Future<void>
Unmute a remote participant's video (client-side - resumes receiving video) Note: Remote tracks don't have mute/unmute methods. This method is a placeholder.

Operators

operator ==(Object other) bool
The equality operator.
inherited