Closed Bug 799415 Opened 13 years ago Closed 5 months ago

UI for handling WebRTC camera access requests should show previews

Categories

(Firefox :: Site Permissions, enhancement, P2)

enhancement

Tracking

()

VERIFIED FIXED
143 Branch
Tracking Status
relnote-firefox --- 143+
firefox143 --- verified

People

(Reporter: dao, Assigned: emz)

References

(Depends on 1 open bug, Blocks 1 open bug, Regressed 1 open bug)

Details

(Whiteboard: [getUserMedia] [blocking-gum-])

Attachments

(7 files)

+++ This bug was initially created as a clone of Bug #729522 +++ Mockup: http://new.tinygrab.com/08092efbdd03a3bafe1718fcf0c0bbd6a75aa30e37.jpg
Whiteboard: [getUserMedia] → [getUserMedia] [blocking-gum-]
Component: General → Device Permissions
Severity: normal → N/A
Type: defect → enhancement
Priority: -- → P3

Chrome Canary now supports this as part of chrome://flags/#one-time-permission experiment.

Might be worth up-prioritizing this since we already support preview for screen capture?

Priority: P3 → P2

I'm prototyping this currently. So far it looks like we mostly need to copy what we have for screen share previews. They do a privileged gUM request. I don't see why we couldn't do that for camera.

I have a working camera preview, but I'm still trying to figure out why the framerate is so low. The video freezes for a couple seconds and only advances for a few frames periodically.

Assignee: nobody → emz
Status: NEW → ASSIGNED

There is a small UX change needed here. We most likely don't want to show the video preview right when the permission prompt opens. Otherwise sites can indirectly control when the camera is turned on and the user sees the preview. On camera switch this less of a problem, because the user triggered it. We could add a button that toggles the preview on and off. That would enable showing the preview for the pre-selected camera. Alternatively we could just not select camera by default and force the user to select one. But that would make the common scenario of using the first (or only) camera too slow.

Here is how it looks when I use the screen share preview element for camera preview.

Depends on: 1975984
Attachment #9498877 - Attachment description: WIP: Bug 799415 - camera-preview-wip → WIP: Bug 799415 - Show preview video when switching between cameras in permission dialog.
Attached image idea-1.png

Here is a UX draft from Julian I'm looking to implement. It clearly shows users that they can enable the preview and when they do we already have a placeholder so the layout doesn't shift much.

Attachment #9498877 - Attachment description: WIP: Bug 799415 - Show preview video when switching between cameras in permission dialog. → Bug 799415 - Show preview video in camera permission dialog. r=jib!
Blocks: 1977423
No longer blocks: 1977423
See Also: → 1977423
Blocks: 1977791
Blocks: 1978789
Pushed by ezuehlcke@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/28e83ace1e0c https://hg.mozilla.org/integration/autoland/rev/906089b2466d Show preview video in camera permission dialog. r=jib,fluent-reviewers,desktop-theme-reviewers,bolsson,dao https://github.com/mozilla-firefox/firefox/commit/ea1e25d2d450 https://hg.mozilla.org/integration/autoland/rev/253192cfc745 Add a Storybook story for the new webrtc-preview element. r=reusable-components-reviewers,akulyk https://github.com/mozilla-firefox/firefox/commit/01d725c7031b https://hg.mozilla.org/integration/autoland/rev/7d6305cf183a Update and add webrtc tests for camera preview. r=jib
Pushed by imoraru@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/aafb8149db1e https://hg.mozilla.org/integration/autoland/rev/ed747e769f88 Revert "Bug 799415 - Update and add webrtc tests for camera preview. r=jib" for causing multiple bc failures.
Flags: needinfo?(emz)
See Also: → 1979071
Flags: needinfo?(emz)
Regressions: 1979394

Release Note Request (optional, but appreciated)
[Why is this notable]:
Video preview feature for camera and camera+mic permission dialog.

[Affects Firefox for Android]: No, it's Desktop only

[Suggested wording]:
When a site asks for access to your camera you can now preview it right in the permission dialog. This is especially helpful when switching between multiple cameras.

relnote-firefox: --- → ?

Added to the Fx143 relnotes.

Blocks: 1982028

I wonder if the styling for the button needs to be changed such that it gains more focus attention? The gray colors (Mac, light theme) are hard to notice.

str:

  1. click a Meet link in cal
  2. After Meet opens in a tab, note the camera prompt.
QA Whiteboard: [qa-triage-done-c144/b143] [qa-ver-needed-c144/b143]
Flags: qe-verify+

Verified as fixed using Firefox 143.0b2 on macOS 13, Windows 11 and Ubuntu 22.04. WebRTC camera access request is now showing preview accordingly.
However, I've encountered bug 1984638 while testing on Ubuntu 22.04.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c144/b143] [qa-ver-needed-c144/b143] → [qa-triage-done-c144/b143] [qa-ver-done-c144/b143]
Flags: qe-verify+
Regressions: 1986052
No longer regressions: 1986052
Depends on: 1994391
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: