Closed
Bug 1440356
Opened 6 years ago
Closed 6 years ago
Sharing indicators missing/incorrect when sharing devices in multiple frames
Categories
(Core :: WebRTC: Audio/Video, defect, P1)
Core
WebRTC: Audio/Video
Tracking
()
VERIFIED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox58 | --- | unaffected |
firefox59 | --- | unaffected |
firefox60 | + | verified |
firefox61 | --- | verified |
People
(Reporter: florian, Assigned: pehrsons)
References
Details
(Keywords: regression, sec-low)
Attachments
(4 files, 2 obsolete files)
2.25 KB,
patch
|
johannh
:
review+
|
Details | Diff | Splinter Review |
14.13 KB,
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
2.18 KB,
patch
|
johannh
:
review+
|
Details | Diff | Splinter Review |
3.72 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
STRs: 1. Load data:text/html,<iframe src="https://mozilla.github.io/webrtc-landing/gum_test.html"></iframe><iframe src="https://mozilla.github.io/webrtc-landing/gum_test.html"></iframe> 2. In the second frame, click "Audio" and accept the prompt. 3. In the first frame, click "Video" and accept the prompt. After step 2, I sometimes have no sharing indicator displayed at all (neither the global one nor the tab specific one). After step 3, I usually have a microphone sharing indicator, despite the web page having access to both the microphone and camera. mozregression says: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=3018e377678c88dd85fd6dec8bda445a9e894141&tochange=93a8b769cb7a76aa8eb1c0b182c84d5bdf2fcb71 Marking as security sensitive for now and requesting tracking for 60 because having a page getting a stream from a device without any sharing indicator is scary.
Flags: needinfo?
Reporter | ||
Comment 1•6 years ago
|
||
There seem to be some intermittent component to this, and I'm not sure this has anything to do with frames. The steps in comment 0 let me reproduce consistently, but I can also often reproduce with these simpler steps: 1. Load https://mozilla.github.io/webrtc-landing/gum_test.html 2. Click "Audio" and accept the prompt. I sometimes see no sharing indicator at all after doing this. Sharing "Video" or "Video + Audio" seems to reliably bring the sharing indicators. So this seems to have something to do with a gUM request getting only a microphone stream.
Flags: needinfo? → needinfo?(apehrson)
Reporter | ||
Updated•6 years ago
|
Summary: Sharing indicators missing/incorrect when sharing different kinds of devices in frames → Sharing indicators missing/incorrect when sharing the microphone
Assignee | ||
Comment 2•6 years ago
|
||
This sounds like bug 1438538. Could you confirm with latest nightly?
Flags: needinfo?(apehrson) → needinfo?(florian)
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to Andreas Pehrson [:pehrsons] from comment #2) > This sounds like bug 1438538. Could you confirm with latest nightly? Applying the patch from bug 1438538 fixes the STRs from comment 1. When using the more complicated case with frames from comment 0, there is still a problem: it seems we show the sharing indicators only for the second frame when both frames have an active stream. Eg. if frame1 shares audio+video, I have the correct sharing indicators, then if I start sharing video only in frame2, the audio sharing indicator disappears.
Flags: needinfo?(florian)
Updated•6 years ago
|
status-firefox58:
--- → unaffected
status-firefox-esr52:
--- → unaffected
Reporter | ||
Updated•6 years ago
|
Summary: Sharing indicators missing/incorrect when sharing the microphone → Sharing indicators missing/incorrect when sharing devices in multiple frames
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → apehrson
Status: NEW → ASSIGNED
Rank: 5
Priority: -- → P1
Assignee | ||
Comment 4•6 years ago
|
||
Attachment #8953459 -
Flags: review?(jhofmann)
Assignee | ||
Comment 5•6 years ago
|
||
Attachment #8953463 -
Flags: review?(jhofmann)
Assignee | ||
Updated•6 years ago
|
Attachment #8953459 -
Attachment description: bug_1440356_1.patch → Rewrite IterateWindowListeners to use lambdas
Assignee | ||
Comment 6•6 years ago
|
||
Attachment #8953468 -
Flags: review?(jhofmann)
Assignee | ||
Comment 7•6 years ago
|
||
I'll let padenot review this c++ heavy code instead. It's somewhat in his area.
Attachment #8953459 -
Attachment is obsolete: true
Attachment #8953459 -
Flags: review?(jhofmann)
Attachment #8953551 -
Flags: review?(padenot)
Assignee | ||
Comment 8•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=49c4fd2cf4a1460ff113d3b1d09e0ca20fa21b62 and with the last update (making the unused var `DebugOnly`): https://treeherder.mozilla.org/#/jobs?repo=try&revision=734a75a493c0bf3bde1f5629887645a797d29f38
Assignee | ||
Comment 9•6 years ago
|
||
I had mis-attached the wrong file previously, thank you padenot for noticing.
Attachment #8953463 -
Attachment is obsolete: true
Attachment #8953463 -
Flags: review?(jhofmann)
Attachment #8953918 -
Flags: review?(jhofmann)
Assignee | ||
Comment 10•6 years ago
|
||
The issue here is that we reset the full capture state on each window listener iteration, i.e., UI would only know about the state of the last child window. This is fixed by the patch "Combine CaptureState for all child windows when calculating overall state". Then since I touched IterateWindowListeners which seems written ages ago (passing a void ptr to be mutated in the static callback), and we didn't ship this regression further than Nightly, I took the liberty of rewriting it first to use lambdas that can capture references to allow for the callback to be inlined.
Updated•6 years ago
|
Attachment #8953551 -
Flags: review?(padenot) → review+
Updated•6 years ago
|
Attachment #8953468 -
Flags: review?(jhofmann) → review+
Comment 12•6 years ago
|
||
Comment on attachment 8953918 [details] [diff] [review] Combine CaptureState for all child windows when calculating overall state This patch works fine for me but I think we should really have an automated test for the iframe example that Florian built. Considering that this is just a regression in 60, I think we would still have time to write it in this bug. It's probably not really important whether we test the platform APIs or through checking UI in a browser chrome mochitest. Andreas, what do you think?
Flags: needinfo?(apehrson)
Reporter | ||
Comment 13•6 years ago
|
||
A slight variation of https://searchfox.org/mozilla-central/rev/056a4057575029f58eb69ae89bc7b6c3c11e2e28/browser/base/content/test/webrtc/browser_devices_get_user_media_in_frame.js#133-135 should be enough to have this case covered. It's actually bad luck that this bug breaks just the corner case that wasn't already covered by the test.
Comment 15•6 years ago
|
||
I attached a test!
Flags: needinfo?(apehrson)
Attachment #8955227 -
Flags: review?(florian)
Updated•6 years ago
|
Attachment #8953918 -
Flags: review?(jhofmann) → review+
Comment 16•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7c78b41900d8dbfb82970d02824bd714e695398f
Reporter | ||
Comment 17•6 years ago
|
||
Comment on attachment 8955227 [details] [diff] [review] Test Review of attachment 8955227 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8955227 -
Flags: review?(florian) → review+
Comment 18•6 years ago
|
||
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f3e75a851a23 Rewrite IterateWindowListeners to use lambdas. r=padenot https://hg.mozilla.org/integration/mozilla-inbound/rev/71c5ae05d2ab Combine CaptureState for all child windows when calculating overall state. r=johannh https://hg.mozilla.org/integration/mozilla-inbound/rev/c1c554a92554 Only call the window callback for found listeners. r=johannh https://hg.mozilla.org/integration/mozilla-inbound/rev/20e29db472c7 Add a test for frames overriding WebRTC sharing UI. r=florian
Comment 19•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f3e75a851a23 https://hg.mozilla.org/mozilla-central/rev/71c5ae05d2ab https://hg.mozilla.org/mozilla-central/rev/c1c554a92554 https://hg.mozilla.org/mozilla-central/rev/20e29db472c7
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•6 years ago
|
Flags: qe-verify+
Comment 20•6 years ago
|
||
I managed to reproduce the issue only on Windows 10 x64 using a version of Nightly from 2018-02-22. I partially followed the steps from comment 1, because I couldn't reproduce the issue with the steps from comment 0(The video was not played back, but the sound indicators were present). 1. Load https://mozilla.github.io/webrtc-landing/gum_test.html 2. Click "Audio & Video" and accept the prompt. On the older version of Nightly I didn't get any audio indicators (I unmuted the video) and no video playback. I retested everything on the same platform using latest Nightly 61.0a1 and beta 60.0b6. The issue is not reproducing. The sound indicators are displayed as soon as the "Mute" is unchecked (and the video is displayed as well). Are this results relevant? Could we consider this bug fixed?
Flags: needinfo?(apehrson)
Assignee | ||
Comment 21•6 years ago
|
||
(In reply to Oana Botisan from comment #20) > I managed to reproduce the issue only on Windows 10 x64 using a version of > Nightly from 2018-02-22. > I partially followed the steps from comment 1, because I couldn't reproduce > the issue with the steps from comment 0(The video was not played back, but > the sound indicators were present). > > 1. Load https://mozilla.github.io/webrtc-landing/gum_test.html > 2. Click "Audio & Video" and accept the prompt. > > On the older version of Nightly I didn't get any audio indicators (I unmuted > the video) and no video playback. > > I retested everything on the same platform using latest Nightly 61.0a1 and > beta 60.0b6. The issue is not reproducing. The sound indicators are > displayed as soon as the "Mute" is unchecked (and the video is displayed as > well). > > Are this results relevant? Could we consider this bug fixed? No, your step 1 doesn't do iframes which is crucial to reproducing this. The repro you mention is likely of some other bug. I can repro fine per comment 0, what's the issue you're facing?
Flags: needinfo?(apehrson) → needinfo?(oana.botisan)
Assignee | ||
Comment 22•6 years ago
|
||
(In reply to Andreas Pehrson [:pehrsons] from comment #21) > No, your step 1 doesn't do iframes which is crucial to reproducing this. The > repro you mention is likely of some other bug. Perhaps bug 1438538.
Comment 23•6 years ago
|
||
I finally managed to reproduce the bug using the steps from comment 0 using Nightly from 2018-02-22 on Windows 10 x64. I only got the audio indicator and no video incicator nor image for the video iframe. I retested everything using latest Nightly 61.0a1 and beta 60.0b11 on Windows 10 x64, Ubuntu 16.04 x64 and macOS 10.13. The bug is not reproducing anymore. Both the microphone and the video indicators are displayed in tab and global.
Flags: needinfo?(oana.botisan)
Updated•6 years ago
|
Status: RESOLVED → VERIFIED
status-firefox61:
--- → verified
Assignee | ||
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•