From 84206a70b2d1798f7d1bd864b03bea7ade8f5f1f Mon Sep 17 00:00:00 2001 From: Alexey Rodionov Date: Sun, 5 Nov 2017 13:25:45 +0300 Subject: [PATCH] play() is required in all browsers since #8 merged --- src/imagecapture.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imagecapture.js b/src/imagecapture.js index bff9be8..55233a3 100644 --- a/src/imagecapture.js +++ b/src/imagecapture.js @@ -46,7 +46,7 @@ if (typeof ImageCapture === 'undefined') { this.videoElement.src = URL.createObjectURL(this._previewStream); this.videoElement.muted = true; this.videoElement.setAttribute('playsinline', ''); // Required by Safari on iOS 11. See https://webkit.org/blog/6784 - this.videoElement.play(); // Required by Firefox and Safari + this.videoElement.play(); this.canvasElement = document.createElement('canvas'); // TODO Firefox has https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas