Skip to content

Commit

Permalink
Fix polyfill work in Safari on iOS 11
Browse files Browse the repository at this point in the history
  • Loading branch information
FluorescentHallucinogen authored Nov 5, 2017
1 parent df6a902 commit a2e16a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/imagecapture.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ if (typeof ImageCapture === 'undefined') {
});
this.videoElement.src = URL.createObjectURL(this._previewStream);
this.videoElement.muted = true;
this.videoElement.play(); // required by Firefox
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.canvasElement = document.createElement('canvas');
// TODO Firefox has https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas
Expand Down

0 comments on commit a2e16a1

Please sign in to comment.