From ff4c1382971249100aa7739d82d0cd3e2679041f Mon Sep 17 00:00:00 2001 From: n4k0 Date: Thu, 9 Apr 2020 10:40:45 +0200 Subject: [PATCH] Set playsinline attribute of video to true to make WebRTC work on mobile Safari. --- s/webrtc-capturestill/capture.js | 1 + 1 file changed, 1 insertion(+) diff --git a/s/webrtc-capturestill/capture.js b/s/webrtc-capturestill/capture.js index 7cf53c8..def55cb 100644 --- a/s/webrtc-capturestill/capture.js +++ b/s/webrtc-capturestill/capture.js @@ -28,6 +28,7 @@ navigator.mediaDevices.getUserMedia({video: true, audio: false}) .then(function(stream) { video.srcObject = stream; + video.setAttribute("playsinline", true); video.play(); }) .catch(function(err) {