Closed Bug 1369108 Opened 8 years ago Closed 8 years ago

Ask for WebRTC app permissions asynchronously on Android

Categories

(Core :: WebRTC, enhancement)

Unspecified
Android
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(3 files)

Currently on Android, we ask for camera permission synchronously on the media thread [1]. It's bad because, 1) It can indefinitely block the media thread 2) The way we ask for permission in VideoCaptureDeviceInfoAndroid.java is Fennec-specific and will fail to work for GeckoView I think the correct solution is to introduce an earlier step in the gUM chain to ask for permissions asynchronously. [1] https://dxr.mozilla.org/mozilla-central/rev/7b8937970f9ca85db88cb2496f2112175fd847c8/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java#78
Comment on attachment 8873109 [details] Bug 1369108 - 2. Refresh Android camera list when necessary; https://reviewboard.mozilla.org/r/144562/#review148808
Attachment #8873109 - Flags: review?(rjesup) → review+
Comment on attachment 8873108 [details] Bug 1369108 - 1. Introduce optional device permission step; https://reviewboard.mozilla.org/r/144560/#review148814 ::: dom/media/MediaManager.cpp:1759 (Diff revision 1) > + const char16_t* const type = > + aVideoType != MediaSourceEnum::Camera ? u"audio" : > + aAudioType != MediaSourceEnum::Microphone ? u"video" : > + u"all"; find it easier to read with parens
Attachment #8873108 - Flags: review?(rjesup) → review+
Comment on attachment 8873110 [details] Bug 1369108 - 3. Implement new device permission code path for Fennec; https://reviewboard.mozilla.org/r/144564/#review149164
Attachment #8873110 - Flags: review?(esawin) → review+
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/483b253cdd73 1. Introduce optional device permission step; r=jesup https://hg.mozilla.org/integration/mozilla-inbound/rev/54c93d5eb308 2. Refresh Android camera list when necessary; r=jesup https://hg.mozilla.org/integration/mozilla-inbound/rev/0a58469c1801 3. Implement new device permission code path for Fennec; r=esawin
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: