consumeWebcamStreams method

Future<void> consumeWebcamStreams()

Starts consuming (subscribing to) this participant’s webcam (video) streams.

Takes effect only when the room was created with autoConsume: false.

  • Streams are received automatically unless the room was created with autoConsume: false. Call this to start receiving the participant’s webcam in that case, or again after stopConsumingWebcamStreams.

  • Once consumed, the video stream will be available in Participant.streams with kind == MediaType.VIDEO.

This is useful for:

  • Lazy loading participant video
  • Pin-based or spotlight-based rendering
  • Optimizing bandwidth in large rooms

Implementation

Future<void> consumeWebcamStreams() async {
  await _consumeWebcamStreams?.call(id);
}