Stream class

Represents a media stream in a VideoSDK room.

  • A Stream object encapsulates either an audio or video track from a participant, including screen sharing streams. It provides methods to control playback and listen to stream state changes.

Usage

// Listen to stream state changes
stream.on(Events.streamStateChanged, (state) {
  print('Stream state changed: $state');
});

// Pause the stream
stream.pause();

// Resume the stream
await stream.resume();

See also:

  • Participant, which produces streams
  • Room, which manages all streams in a meeting

Properties

id String
Represents the id for that stream .
getter/setter pair
isLocal bool
Whether this stream belongs to the local participant.
latefinal
kind String?
kind represents the type of stream which could be audio | video or share .
getter/setter pair
renderer RTCVideoRenderer?
This is a renderer, which is passed to RTCVideoView widget.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
track ↔ Consumer
It represents a single media track within a stream. You can call pause() method to pause MediaStreamTrack. And you can also call resume() method to resume MediaStreamTrack.
getter/setter pair

Methods

on(Events event, Function handler) → void
pause() → void
By using pause(), a participant can pause the stream of Remote Participant.
resume() Future<void>
By using resume(), a participant can resume the stream of Remote Participant.