Created
April 10, 2020 19:08
-
-
Save andrewminerd/12e90f7b7ac9ba599336fc10a50bc85a to your computer and use it in GitHub Desktop.
Updating cables.gl patch.js for iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In patch.js.. | |
#1) Look for: | |
c=document.createElement("video"); | |
Add the following after the semicolon: | |
c.setAttribute('playsinline',1); | |
Should now look something like... | |
...,c=document.createElement("video");c.setAttribute('playsinline',1);const d="webcam"+CABLES.uuid();... | |
#2) Look for: | |
||navigator.mozGetUserMedia, | |
Before comma, add: | |
||function(spec, success, fail) { navigator.mediaDevices.getUserMedia(spec).then(success, fail); } | |
Should now look like: | |
...,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedi | |
a||navigator.mozGetUserMedia||function(spec, success, fail) { navigator.mediaDevices.getUserMedia(spec).then(success, fail); },navigator.getUserMedia... | |
Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment