TgoRoomManager class

Manager for handling room connection and events.

This is a singleton class that manages the connection to a LiveKit room.

Usage

// Join a room
final roomInfo = RoomInfo(...);
await TgoRTC.instance.roomManager.joinRoom(roomInfo);

// Listen to connection status
TgoRTC.instance.roomManager.addConnectListener((roomName, status, reason) {
  print('Room $roomName: $status ($reason)');
});

// Leave the room
await TgoRTC.instance.roomManager.leaveRoom();

Properties

currentRoomInfo RoomInfo?
no setter
currentVideoInfo VideoInfo
获取当前本地视频信息
no setter
hashCode int
The hash code for this object.
no setterinherited
listener ↔ EventsListener<RoomEvent>?
getter/setter pair
room ↔ Room?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addConnectListener(dynamic listener(String roomName, ConnectStatus status, String reason)) → dynamic
addVideoInfoListener(VideoInfoListener listener) → void
添加本地视频信息监听器
joinRoom(RoomInfo roomInfo, {dynamic micEnabled = false, dynamic cameraEnabled = false, bool? screenShareEnabled, bool? scrennShareEnabled}) → dynamic
leaveRoom() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeConnectListener(dynamic listener(String roomName, ConnectStatus, String)) → dynamic
removeVideoInfoListener(VideoInfoListener listener) → void
移除本地视频信息监听器
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance TgoRoomManager
no setter