Suggestions

close search

StringeeVideoRoom

public class StringeeVideoRoom



Represents a video room.



Summary


Properties
String id

Room id.

bool recorded

Whether the room is recorded.

StreamController<dynamic> eventStreamController

Stream of room events.

Events
StringeeRoomEvents didJoinRoom

Invoked when a user joins this room; body is StringeeRoomUser.

StringeeRoomEvents didLeaveRoom

Invoked when a user leaves this room; body is StringeeRoomUser.

StringeeRoomEvents didAddVideoTrack

Invoked when a video track is added; body is StringeeVideoTrackInfo.

StringeeRoomEvents didRemoveVideoTrack

Invoked when a video track is removed; body is StringeeVideoTrackInfo.

StringeeRoomEvents didReceiveRoomMessage

Invoked when the room receives a data message.

StringeeRoomEvents trackReadyToPlay

Invoked 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.

Properties


id
Room id.
recorded
Whether the room is recorded.
eventStreamController
Stream of room events.

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.

Public methods


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.