stopVideoStream function

void stopVideoStream(
  1. MediaStream stream
)

Implementation

void stopVideoStream(MediaStream stream) {
  print('STOP LOCAL STREAM');
  List<MediaStreamTrack> vidTracks = stream.getVideoTracks();
  for (var track in vidTracks) {
    track.enabled = false;
  }
}