Closed
Bug 835953
Opened 12 years ago
Closed 12 years ago
Releasing webcam access in gUM still leaves the green icon UI showing the camera is active shown
Categories
(Firefox :: Site Permissions, defect, P1)
Firefox
Site Permissions
Tracking
()
VERIFIED
FIXED
Firefox 21
People
(Reporter: jsmith, Assigned: dao)
References
Details
(Whiteboard: [getUserMedia][blocking-gum+])
Attachments
(2 files, 5 obsolete files)
(deleted),
patch
|
Dolske
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Dolske
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Build: 1/29 Nightly
Steps:
1. Go to http://mozilla.github.com/webrtc-landing/gum_test.html
2. Select video
3. Accept permissions for a webcam
4. Select stop
Expected:
The camera should be released - resulting in no UI showing that the camera is actively being used.
Actual:
The green icon UI is still shown showing the camera is still being used.
Reporter | ||
Updated•12 years ago
|
Whiteboard: [getUserMedia]
Reporter | ||
Updated•12 years ago
|
Blocks: getUserMediaUI
Reporter | ||
Comment 1•12 years ago
|
||
Seems basic enough that it should block.
Whiteboard: [getUserMedia] → [getUserMedia][blocking-gum+]
Comment 2•12 years ago
|
||
We're generating recording-device-events event with shutdown, and also should be dispatching to the mainthread a GetUserMediaListenerRemove to remove the window ID from the active window list, so the UI *should* reflect no streams in use.... Dao?
Flags: needinfo?(dao)
Comment 3•12 years ago
|
||
Taking bug unless/until we know it's a UI issue.
Assignee: nobody → rjesup
Priority: -- → P1
Assignee | ||
Comment 4•12 years ago
|
||
We observe recording-device-events for the global indicator. Using this for the per-tab indicator is possible but far from ideal, since we'd need to match the list of all capturing windows with the list of all tabs in order to find the indicator we'd need to update.
Flags: needinfo?(dao)
Comment 5•12 years ago
|
||
Ok, what is the UI waiting for to remove the recording indicator from the tab? I don't think there's anything else we're sending... Perhaps there's a disconnect between UI and MediaManager, or something needs to be added to the API between MediaManager and the UI.
Assignee | ||
Comment 6•12 years ago
|
||
The indicator will currently be removed only when navigating away from the page. It doesn't attempt to use any other UI, since as you say there is none.
Comment 7•12 years ago
|
||
Aha. So there is in fact a disconnect; the indicator is supposed to go away when the last use is gone and the application no longer has access to the camera or mic. I and others assumed sending the recording-device-event and removing it from the window list would result in its being removed from the UI of the tab.
Let me look at what I'm sending, but please feel free to suggest some additional notification needed to get this done. Thanks
Comment 8•12 years ago
|
||
How about I send a "recording-window-ended" Notification with the WindowID as the argument when the last active listener for the window goes away?
I'm open as to the name. We could overload recording-device-events with an argument of "window-ended: windowId" or similar in JSON form if that works better. I'm open.
Comment 9•12 years ago
|
||
Comment 10•12 years ago
|
||
Comment on attachment 709085 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
preemptively asking for review under the assumption that this will fill the need from the backend (maybe with rewording the Notification topic)
Attachment #709085 -
Flags: review?(gavin.sharp)
Attachment #709085 -
Flags: review?(doug.turner)
Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Randell Jesup [:jesup] from comment #8)
> How about I send a "recording-window-ended" Notification with the WindowID
> as the argument when the last active listener for the window goes away?
I'd prefer getting the actual DOM window as the notification subject.
Assignee | ||
Comment 12•12 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #11)
> (In reply to Randell Jesup [:jesup] from comment #8)
> > How about I send a "recording-window-ended" Notification with the WindowID
> > as the argument when the last active listener for the window goes away?
>
> I'd prefer getting the actual DOM window as the notification subject.
Actually, I don't really mind. Getting the window via the window ID in front-end code is simple enough.
Assignee | ||
Comment 13•12 years ago
|
||
Here's how I imagine the front-end part would look like. Currently untested.
Comment 14•12 years ago
|
||
Comment on attachment 709104 [details] [diff] [review]
front-end part
Review of attachment 709104 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/modules/webrtcUI.jsm
@@ +212,5 @@
> }
> +
> +function removeBrowserSpecificIndicator(aSubject, aTopic, aData) {
> + let browser = getBrowserForWindowId(aData);
> + let PopupNotifications = browser.ownerDocument.defaultView.PopupNotifications;
Not being a front-end person: do you need to check if the window still exists in some way?
Assignee | ||
Comment 15•12 years ago
|
||
(In reply to Randell Jesup [:jesup] from comment #14)
> Not being a front-end person: do you need to check if the window still
> exists in some way?
Yeah, seems reasonable.
Comment 16•12 years ago
|
||
Comment on attachment 709085 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
Review of attachment 709085 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/ipc/PContent.ipdl
@@ +449,5 @@
> // get nsIVolumeService to broadcast volume information
> async BroadcastVolume(nsString volumeName);
>
> async RecordingDeviceEvents(nsString recordingStatus);
> + async RecordingWindowEnded(nsString windowID);
Passing the window idea here is probably the wrong thing to do. Instead, you can use the TabChild / PBrowser which knows about windows.
Comment 17•12 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #16)
> Comment on attachment 709085 [details] [diff] [review]
> Notify UI that all gUM streams for a WindowID are gone
>
> Review
> >
> > async RecordingDeviceEvents(nsString recordingStatus);
> > + async RecordingWindowEnded(nsString windowID);
>
> Passing the window idea here is probably the wrong thing to do. Instead,
> you can use the TabChild / PBrowser which knows about windows.
I can try, but I'll note that all I have identifying the window is the WindowID. If it's as easy as it appears to convert windowid's on the UI side, have me do it doesn't seem to gain anything. MediaManager keeps a map of WindowID's with an array of listeners (i.e. MediaStreams) in use by that window. I'm sending this event when the last listener for the WindowID is removed (last mediastream goes away).
Comment 18•12 years ago
|
||
-> Dao for the UI part
If I need to revise the internals in order to pass back something else, please let me know (and if possible point me to an example).
Assignee: rjesup → dao
Updated•12 years ago
|
status-firefox19:
--- → disabled
status-firefox20:
--- → affected
status-firefox21:
--- → affected
tracking-firefox20:
--- → ?
tracking-firefox21:
--- → ?
Reporter | ||
Comment 19•12 years ago
|
||
Rationale for tracking-firefox 20 nomination:
This breaks a basic functional flow in a privacy requirement we are required to have for the getUserMedia UI. A user must be able to understand when web content from X tabs has camera/mic access vs. not having it. That includes the case when web content decides to release access to the camera/mic through the Local Media Stream returned from a successful gUM call.
The user impact of this bug is the when web content decides to release camera/mic access, we end up still indicating in the UI that the web content still access to the camera/mic actively. This effectively ends up lieing to the user, as they think web content still is making use of their camera/mic, when in fact, the camera/mic was effectively released. As a result, our gUM triage deemed this as blocking, as the device integration + privacy requirement makes this a critical flow that we have to get correct.
Updated•12 years ago
|
Comment 20•12 years ago
|
||
Comment on attachment 709085 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
I don't think I have any input to add beyond Dao/Doug's feedback on this.
Attachment #709085 -
Flags: review?(gavin.sharp)
Comment 21•12 years ago
|
||
Updated•12 years ago
|
Attachment #709085 -
Attachment is obsolete: true
Attachment #709085 -
Flags: review?(doug.turner)
Comment 22•12 years ago
|
||
this patch is not compilable and has dangling ends. It also isn't needed for FF20 or FF21!
Comment 23•12 years ago
|
||
Comment on attachment 714271 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
This isn't needed for e10s targets until at least FF22, maybe FF23, so all we need now is the straight observer service patch for desktop.
Attachment #714271 -
Flags: review?(dolske)
Comment 24•12 years ago
|
||
Note: that means we don't need to support e10s right now, so things are simpler. I'll break the e10s part into a separate bug
Updated•12 years ago
|
Attachment #714272 -
Attachment is obsolete: true
Assignee | ||
Comment 25•12 years ago
|
||
Comment on attachment 714271 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
>+ // Notify the UI that this window no longer has gUM active
>+ char windowBuffer[32];
>+ PR_snprintf(windowBuffer, sizeof(windowBuffer), "%llu", aWindowID);
>+ nsAutoString data;
>+ data.Append(NS_ConvertUTF8toUTF16(windowBuffer));
>+
>+ nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
>+ obs->NotifyObservers(nullptr, "recording-window-ended", data.get());
If I'm not mistaken, aWindowID is the inner window id. We need the outer window id.
Attachment #714271 -
Flags: review?(dolske) → review-
Comment 26•12 years ago
|
||
updated; doing test compile/etc now
Updated•12 years ago
|
Attachment #714384 -
Flags: review?(dao)
Updated•12 years ago
|
Attachment #714384 -
Flags: review?(dolske)
Comment 27•12 years ago
|
||
Updated•12 years ago
|
Attachment #714384 -
Attachment is obsolete: true
Attachment #714384 -
Flags: review?(dolske)
Attachment #714384 -
Flags: review?(dao)
Comment 28•12 years ago
|
||
Comment on attachment 714393 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
Fix silly typo
Attachment #714393 -
Flags: review?(dolske)
Attachment #714393 -
Flags: review?(dao)
Assignee | ||
Comment 29•12 years ago
|
||
Something is still wrong here. For example, while testing on http://mozilla.github.com/webrtc-landing/gum_test.html, getUserMedia:request gives me 47 as the outer window ID and recording-window-ended gives me 49. nsIDOMWindowUtils::getOuterWindowWithId finds the window for the former but not for the latter.
Assignee | ||
Comment 30•12 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #29)
> Something is still wrong here. For example, while testing on
> http://mozilla.github.com/webrtc-landing/gum_test.html, getUserMedia:request
> gives me 47 as the outer window ID and recording-window-ended gives me 49.
> nsIDOMWindowUtils::getOuterWindowWithId finds the window for the former but
> not for the latter.
Scratch that, my build still had the previous patch applied.
Assignee | ||
Updated•12 years ago
|
Attachment #714271 -
Attachment is obsolete: true
Assignee | ||
Comment 31•12 years ago
|
||
Attachment #709104 -
Attachment is obsolete: true
Attachment #714441 -
Flags: review?(dolske)
Assignee | ||
Comment 32•12 years ago
|
||
Comment on attachment 714393 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
Looks ok to me, but I don't feel comfortable enough reviewing this code.
Attachment #714393 -
Flags: review?(dao)
Updated•12 years ago
|
Attachment #714441 -
Flags: review?(dolske) → review+
Comment 33•12 years ago
|
||
Comment on attachment 714393 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
Looks like we already do similar stuff here, so I'll mark r+ even though this isn't my forte.
Attachment #714393 -
Flags: review?(dolske) → review+
Comment 34•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/163daa0ef353
https://hg.mozilla.org/integration/mozilla-inbound/rev/f1f4c2e87acf
Target Milestone: --- → Firefox 21
Assignee | ||
Comment 35•12 years ago
|
||
(In reply to Randell Jesup [:jesup] from comment #34)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/163daa0ef353
Backed out and landed with me as the author:
https://hg.mozilla.org/integration/mozilla-inbound/rev/02a865a0077e
Comment 36•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/163daa0ef353
https://hg.mozilla.org/mozilla-central/rev/f1f4c2e87acf
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 37•12 years ago
|
||
Needs an uplift to Aurora preferably before we go to build for Beta 1.
Keywords: verifyme
QA Contact: jsmith
Whiteboard: [getUserMedia][blocking-gum+] → [getUserMedia][blocking-gum+][webrtc-uplift]
Comment 38•12 years ago
|
||
Comment on attachment 714393 [details] [diff] [review]
Notify UI that all gUM streams for a WindowID are gone
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Initial indicator support
User impact if declined: The "camera/mic is active" indicator will remain in the URLbar until you navigate away, even after you stop accessing the camera/mic.
Testing completed (on m-c, etc.): On m-c; locally tested by me.
Risk to taking this patch (and alternatives if risky): very low risk, merely sends a Notification.
String or UUID changes made by this patch: Notification string added, no l10n.
Need to land with the other patch on this bug (front-end to receive the notification).
Attachment #714393 -
Flags: approval-mozilla-aurora?
Comment 39•12 years ago
|
||
Comment on attachment 714441 [details] [diff] [review]
front-end part
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Initial indicator support
User impact if declined: The "camera/mic is active" indicator will remain in the URLbar until you navigate away, even after you stop accessing the camera/mic.
Testing completed (on m-c, etc.): On m-c; locally tested by me.
Risk to taking this patch (and alternatives if risky): very low risk
String or UUID changes made by this patch: Notification string added, no l10n.
Need to land with the other patch on this bug (back-end to send the notification).
Attachment #714441 -
Flags: approval-mozilla-aurora?
Comment 40•12 years ago
|
||
Updated•12 years ago
|
Attachment #714393 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•12 years ago
|
Attachment #714441 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 41•12 years ago
|
||
Reporter | ||
Comment 42•12 years ago
|
||
Verified on Nightly on 2/18.
Updated•12 years ago
|
Whiteboard: [getUserMedia][blocking-gum+][webrtc-uplift] → [getUserMedia][blocking-gum+]
Updated•10 years ago
|
Component: General → Device Permissions
You need to log in
before you can comment on or make changes to this bug.
Description
•