Skip to content

Commit f0337ef

Browse files
authored
Merge pull request #283 from flyerhzm/support-ios-safari
Support ios safari
2 parents 5a3e79a + 50e55ab commit f0337ef

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

webcam.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ var Webcam = {
9292
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
9393
this.userMedia = this.userMedia && !!this.mediaDevices && !!window.URL;
9494

95-
if (this.iOS) {
96-
this.userMedia = null;
97-
}
98-
9995
// Older versions of firefox (< 21) apparently claim support but user media does not actually work
10096
if (navigator.userAgent.match(/Firefox\D+(\d+)/)) {
10197
if (parseInt(RegExp.$1, 10) < 21) this.userMedia = null;
@@ -274,6 +270,7 @@ var Webcam = {
274270
// setup webcam video container
275271
var video = document.createElement('video');
276272
video.setAttribute('autoplay', 'autoplay');
273+
video.setAttribute('playsinline', 'playsinline');
277274
video.style.width = '' + this.params.dest_width + 'px';
278275
video.style.height = '' + this.params.dest_height + 'px';
279276

0 commit comments

Comments
 (0)