Skip to main content
Version: 1.0.x

Participant Video Stream

  • Using this feature, you can pause/resume participant's video stream.

Pause video stream

  • pause() method is used to pause videostream of a participant.
ElevatedButton(
child: Text("Pause Video"),
onPressed: () {
List<Stream> streams = participant.streams.where((e) => e.kind == 'video').toList();

if(streams.length != 0){
Stream videoStream = streams[0];
videoStream.track.pause();
}
}
),

Resume video stream

  • resume() method is used to resume videostream of a participant.
ElevatedButton(
child: Text("Resume Video"),
onPressed: () {
List<Stream> streams = participant.streams.where((e) => e.kind == 'video').toList();

if(streams.length != 0){
Stream videoStream = streams[0];
videoStream.track.resume();
}
}
),

Events

Event associated with pause():

Event associated with resume():

participant.on(Events.streamPaused, (Stream stream){
if (stream.kind === "video") {
//particiapnt video stream paused
}
});
participant.on(Events.streamResumed, (Stream stream){
if (stream.kind === "video") {
//particiapnt video stream resumed
}
});