public class StringeeVideoRoom
Represents a video room.
| Properties | |
|---|---|
String |
idRoom id. |
bool |
recordedWhether the room is recorded. |
StreamController<dynamic> |
eventStreamControllerStream of room events. |
| Events | |
|---|---|
StringeeRoomEvents |
didJoinRoomInvoked when a user joins this room; body is StringeeRoomUser. |
StringeeRoomEvents |
didLeaveRoomInvoked when a user leaves this room; body is StringeeRoomUser. |
StringeeRoomEvents |
didAddVideoTrackInvoked when a video track is added; body is StringeeVideoTrackInfo. |
StringeeRoomEvents |
didRemoveVideoTrackInvoked when a video track is removed; body is StringeeVideoTrackInfo. |
StringeeRoomEvents |
didReceiveRoomMessageInvoked when the room receives a data message. |
StringeeRoomEvents |
trackReadyToPlayInvoked when a subscribed track is ready to play; body is StringeeVideoTrack. |
| Public methods | |
|---|---|
Future<Map<dynamic, dynamic>> |
publish(StringeeVideoTrack videoTrack)Publishes a local video track to this room. |
Future<Map<dynamic, dynamic>> |
unpublish(StringeeVideoTrack videoTrack)Unpublishes a local video track from this room. |
Future<Map<dynamic, dynamic>> |
subscribe(StringeeVideoTrackInfo trackInfo, StringeeVideoTrackOption option)Subscribes to a remote track. |
Future<Map<dynamic, dynamic>> |
unsubscribe(StringeeVideoTrackInfo trackInfo)Unsubscribes from a remote track. |
Future<Map<dynamic, dynamic>> |
leave({required bool allClient})Leaves this room. |
Future<Map<dynamic, dynamic>> |
sendMessage(Map<dynamic, dynamic> msg)Sends a data message to this room. |
void |
destroy()Cancels native event subscription and closes the room event stream. |
id |
|---|
| Room id. |
recorded |
|---|
| Whether the room is recorded. |
eventStreamController |
|---|
| Stream of room events. |
didJoinRoom |
|---|
| Invoked when a user joins this room; body is StringeeRoomUser. |
didLeaveRoom |
|---|
| Invoked when a user leaves this room; body is StringeeRoomUser. |
didAddVideoTrack |
|---|
| Invoked when a video track is added; body is StringeeVideoTrackInfo. |
didRemoveVideoTrack |
|---|
| Invoked when a video track is removed; body is StringeeVideoTrackInfo. |
didReceiveRoomMessage |
|---|
| Invoked when the room receives a data message. |
trackReadyToPlay |
|---|
| Invoked when a subscribed track is ready to play; body is StringeeVideoTrack. |
publish(StringeeVideoTrack videoTrack) |
|---|
| Publishes a local video track to this room. |
unpublish(StringeeVideoTrack videoTrack) |
|---|
| Unpublishes a local video track from this room. |
subscribe(StringeeVideoTrackInfo trackInfo, StringeeVideoTrackOption option) |
|---|
| Subscribes to a remote track. |
unsubscribe(StringeeVideoTrackInfo trackInfo) |
|---|
| Unsubscribes from a remote track. |
leave({required bool allClient}) |
|---|
| Leaves this room. |
sendMessage(Map<dynamic, dynamic> msg) |
|---|
| Sends a data message to this room. |
destroy() |
|---|
| Cancels native event subscription and closes the room event stream. |