diff --git a/sdk/src/CameraPlayer.js b/sdk/src/CameraPlayer.js index 9c6ba589ad74b3301736c3ed4eff74c8a0e4652c..1cf153c03f0b33c1b7dea6d5a35a2a3ee8a4cd10 100644 --- a/sdk/src/CameraPlayer.js +++ b/sdk/src/CameraPlayer.js @@ -154,10 +154,12 @@ export default class CameraPlayer { } stopCameraVideo() { - if(this.videoStream) { - this.stopVideo = true; - this.video.pause(); + this.stopVideo = true; + if (this.video.srcObject) { this.video.srcObject.getTracks().forEach(track => track.stop()); + } + this.video.srcObject = null; + if (this.videoStream) { this.videoStream.stop(); } }