Now that iOS 11.3 is out with the updated version of Safari.
Has anybody been able to successfully use the getUserMedia APIs to display the camera output onto a canvas?
e.g We've opened both
https://simpl.info/getusermedia/
and
https://webrtc.github.io/samples/src/content/getusermedia/canvas/
in Safari, they both ask for access to the camera - however, neither of them render anything but a black square
e.g
Adding a playsinline
attribute to the relevant <video>
tag should do the trick:
var video = document.getElementById("video-element");
video.setAttribute("playsinline", true);
I've also found this bug difficult to replicate. And judging from the comments above, I'm not sure it's due to iOS version changes alone. Moreover, I'm unable to find any official documentation on the topic.
Nonetheless, here is some related reading material:
See this issue on GitHub
And this StackOverflow question: iOS 11 getUserMedia not working?
Edit: The WebKit BugZilla thread was mentioned in the GitHub issue I referenced above, which seems to be the closest thing to "official documentation" available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With