Code to enable media recording on Chrome/Firefox on iPhone/iPad
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

Currently, the code of this page doesn't seem to work on Chrome or Firefox on the iPhone X or the iPad Mini 4:

Expected behaviour: Activate the camera and record audio and video
Behaviour: Buttons do not work and do not activate camera or record audio or video

Link to source
Link to relevant section in main.js

I'm looking for code that will make this work on Chrome and Firefox on iPhones and iPads.

Does it work on Safari on iOS?
sguha 1 year ago
@sguha it should work on the latest Safari. (v12 & v13)
VladimirMikulic 1 year ago

Crowdsource coding tasks.

1 Solution

Winning solution


Unfortunately, media recording is not supported on iOS Chrome & Firefox.

Although Chrome & Firefox are modern browsers, their capabilities are limited by iOS. That's because they use Apple's UIWebView/WKWebView.

I am sorry that I was unable to provide the solution you were looking for but we can't do anything until Apple adds support for this.

You can check out the bug report.

"This is a known limitation of WKWebView that we want to fix."

Thanks for the response! Are you aware of any alternatives/workarounds to recording video via the browser in iOS Chrome/Firefox?
Jay 12 months ago
Hi Jay! I wish there was but as I said this is not about JavaScript, it's about C++/Objective-C. We can't "polyfill" this or find a "workaround". JavaScript runs in a sandboxed environment. It doesn't have direct access to the OS. In our case, we want access to the camera. Since Apple's WKWebView doesn't provide this functionality (API) in JavaScript there is no way we can access it.
VladimirMikulic 12 months ago
weird that this works in Safari
ramonza 12 months ago
@ramonza not really :) Other (3rd) party browsers are forced to use Webkit. The same engine that powers Safari but Safari has a special treatment.
VladimirMikulic 12 months ago
@ramonza - can you confirm that you're able to have it work on Safari on iPhone? @VladimirMikulic - thanks for the additional details, is there any way at all that you can think of to allow in iOS a browser window a split screen to record a video while viewing a video?
Jay 12 months ago
@jay, unfortunately, there is no way we can record a video. It's just how Apple's ecosystem works. Our hands are tied until they patch Webkit for 3rd party browsers.
VladimirMikulic 12 months ago