-
Notifications
You must be signed in to change notification settings - Fork 984
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
(iOS) Avoid repetitive permission prompts #1245
Conversation
78f907e
to
5399488
Compare
Works for me, for what its worth! I would consider setting the default to "grant" because nobody wants the repeated permission request. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
5399488
to
2ebe3d7
Compare
I fixed merge issues and changed default to 'grant' as suggested |
This comment was marked as spam.
This comment was marked as spam.
2ebe3d7
to
3a46e22
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1245 +/- ##
==========================================
- Coverage 80.86% 80.84% -0.03%
==========================================
Files 16 16
Lines 1840 1848 +8
==========================================
+ Hits 1488 1494 +6
- Misses 352 354 +2 ☔ View full report in Codecov by Sentry. |
Thanks for doing the work to implement this! With the "grant by default" behaviour, does that mean things like 3rd party iframes on a page would automatically be able to initiate webcam and microphone access? If so, I don't think we can have it that permissive by default. A reasonable middle ground would probably be the "grantIfSameHostElsePrompt" behaviour so that the app's same-origin content can access those APIs but any 3rd party origins would result in a prompt. |
Yes, that is correct. There is still an initial permission request, but once the app has permission, any site can access the webcam and microphone with "grant". In our use case that is exactly what we need, since we are taking a photo from a website within iframe, but I agree that "grantIfSameHostElsePrompt" might be better as default. I will change it. |
3a46e22
to
b9d2a04
Compare
Do we have an estimated release date for version 8.0.0? |
@erikramalho No estimated release date because it's entirely dependent on volunteer time to investigate and address the remaining bugs and new features. |
Thanks for the answer @dpogue. I'll ask my team to look and see if we can help with any remaining bugs and new features. |
Platforms affected
iOS
Motivation and Context
resolves #1166
Description
If the app uses WebRTC, the user is initially prompted for permission twice, and then prompted again each time the app is restarted.
The solution is inspired by react:
react-native-webview/react-native-webview#2257
Testing
I tested the changes in a project that is using WebRTC camera streaming.
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)