Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate getUserMedia shim for iOS? #183

Open
henrylearn2rock opened this issue Aug 14, 2018 · 3 comments
Open

Integrate getUserMedia shim for iOS? #183

henrylearn2rock opened this issue Aug 14, 2018 · 3 comments

Comments

@henrylearn2rock
Copy link

My app uses getUserMedia but I realized that wkwebview does not support getUserMedia.

The project looks interesting:
https://github.com/common-tater/wkwebview-getusermedia-shim/

Any idea if it's possible to integrate this into react-native-wkwebview?

Thanks!

@insraq
Copy link
Contributor

insraq commented Aug 14, 2018

getUserMedia has been deprecated. And since this project aims to be a thin wrapper around WkWebView, it's not likely to be integrated into this repo. Feel free to fork and add the shim yourself though.

@henrylearn2rock
Copy link
Author

MediaDevices.getUserMedia is not deprecated. https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia

I would love to try the shim but I am not sure how. Any pointer? :) Thanks.

@insraq
Copy link
Contributor

insraq commented Aug 14, 2018

This shim adds the method to navigator.getUserMedia which is deprecated.

The Objective C implementation actually uses WKUserscript. which should be quite easy to integrate. You do need to change the Objective C part of this repo: https://github.com/CRAlpha/react-native-wkwebview/tree/master/ios/RCTWKWebView

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants