restartVideoStream function

void restartVideoStream(
  1. MediaStream stream
)

Implementation

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