Skip to content Skip to sidebar Skip to footer

Access Camera Or Webcam Without Webrtc

In my website, it needs to access camera or webcam. But webRTC is not supported yet on ios webview based on https://forums.developer.apple.com/thread/88052 (please cmiiw). So, I'm

Solution 1:

2021 Edit:

We now have access to getUserMedia on iOS WebViews!


The Good News:

As of iOS 14.3, iOS now allows access to getUserMedia in a WKWebView

Whenever I have questions about browser features like this, I find it very helpful to check out caniuse.com. In this case, there is a note on the entry for Safari & Chrome for iOS

Before iOS 14.3 getUserMedia returned no video input devices in UIWebView or WKWebView, but only directly in Safari

The Old News:

Prior to 2021, we could not access getUserMedia on iOS outside of Safari. So back then, a workaround was to build a website and direct iOS users to visit the site in Safari instead of making a native app for iOS.

The Other News:

getUserMedia controls access to a user's camera and microphone, whereas WebRTC helps you send that audio/video to another client, like in a video chat. Here you're stuck on getting the video in the first place so you don't need to worry about WebRTC yet, but when you do, I recommend you check out This article that helped me.

And if you want to test getUserMedia or WebRTC functions yourself, try using These provided samples, so that you can be sure that it is not the fault of your own code :)

Post a Comment for "Access Camera Or Webcam Without Webrtc"