Room class

Room is the primary construct for LiveKit conferences. It contains a group of Participants, each publishing and subscribing to Tracks. Notifies changes to its state via two ways, by assigning a delegate, or using it as a provider. Room will trigger a change notification update when

  • state changes
  • participant membership changes
  • active speakers are different
Inheritance

Constructors

Room({@Deprecated('deprecated, please use connectOptions in room.connect()') ConnectOptions connectOptions = const ConnectOptions(), RoomOptions roomOptions = const RoomOptions(), Engine? engine})

Properties

activeSpeakers → UnmodifiableListView<Participant<TrackPublication<Track>>>
a list of participants that are actively speaking, including local participant.
no setter
connectionState → ConnectionState
connection state of the room
no setter
connectOptions → ConnectOptions
no setter
disposeFuncCount → int
no setterinherited
e2eeManager → E2EEManager?
no setter
events → EventsEmitter<RoomEvent>
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isDisposed → bool
no setterinherited
isRecording → bool
no setter
localParticipant → LocalParticipant?
the current participant
no setter
metadata → String?
metadata of the room
no setter
name → String?
name of the room
no setter
remoteParticipants → UnmodifiableMapView<String, RemoteParticipant>
no setter
roomOptions → RoomOptions
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverRegion → String?
Server region
no setter
serverVersion → String?
Server version
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
connect(String url, String token, {ConnectOptions? connectOptions, RoomOptions? roomOptions, FastConnectOptions? fastConnectOptions}) → Future<void>
createListener({bool synchronized = false}) → EventsListener<RoomEvent>
inherited
disconnect() → Future<void>
Disconnects from the room, notifying server of disconnection.
dispose() → Future<bool>
Discards any resources used by the object.
inherited
getParticipantByIdentity(String identity) → Participant<TrackPublication<Track>>?
retrieves a participant by identity
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onDispose(OnDisposeFunc func) → void
inherited
prepareConnection(String url, String? token) → Future<void>
prepareConnection should be called as soon as the page is loaded, in order to speed up the connection attempt. This function will
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setE2EEEnabled(bool enabled) → Future<void>
toString() → String
A string representation of this object.
inherited

Operators

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