stop method

Future stop()

Implementation

Future stop() async {
  try {
    if (stream == null) return;
    Log().debug("Stopping Camera");
    video.pause();
    if (this.stream != null)
      this.stream!.getTracks().forEach((track) => track.stop());
    this.stream = null;
    Log().debug("Camera Stopped");
  } catch(e) {}
}