Camera on iOS only available if webview is recreated
See original GitHub issueBug description:
With allowsInlineMediaPlayback
enabled and mediaPlaybackRequiresUserAction
disabled (this one was a problem on Android), after we ask for camera access on iOS, the camera simply does not load.
After we restart the app, the user is prompted with the webview’s request to access the camera (not the SO one, but the one the browser does). And it works.
To Reproduce:
- Render the webview.
- Send a postMessage to ask native code to request camera permission.
- Grant permission.
- Webview’s
getMediaDevices()
fail.
Expected behavior: Webview should be able to get media devices.
Environment:
- OS: IOS
- OS version: 14.6
- react-native version: 0.63.4
- react-native-webview version: ^11.2.4
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:17
Top Results From Across the Web
React Native Webview (camera, getUserMedia) double ...
This allows iOS to remember the permission decisions and get rid of the initial double-prompt by inheriting the grant from the native layer....
Read more >Access camera and microphone in WKWebView
I am trying to access camera and microphone in WKWebView. I tried many ways but it didn't work. I tried injecting js in...
Read more >Android Platform Guide - Apache Cordova
When the user navigates back to your application, the Activity and Webview will be recreated by the OS, but state will not be...
Read more >Release Note | UniWebView
An issue which causes web view's Url property not parsing correctly when it contains some special characters. # Deprecate. The original iOS-only toolbar...
Read more >Android Widgets | Home Assistant Companion Docs
If you notice that a widget is no longer working try to recreate it. ... Available widgets. Camera. This widget will update every...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @wmaca same problem here, have you already solved?
@wmaca please check the video in the link below to see if it will help.
https://www.youtube.com/watch?v=GAHWt2HPEIM