Non audible object shouldn't register AudioChannelAgent and re-register audio capturing when we create new AudioChannelAgent

VERIFIED FIXED

Status

defect
VERIFIED FIXED
4 years ago
5 months ago

People

(Reporter: alwu, Assigned: alwu)

Tracking

unspecified
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed, b2g-master verified)

Details

Attachments

(2 attachments)

This bug is fork from bug1190040 comment32.

---

In present design, the WindowAudioCaptureChanged() would only be called via the GetAudioCaptured(). 
We don't have a mechanism to automatically capture other new MediaElements which are created after calling GetAudioCaptured(). 

We need to have a check when registering the AudioChannelAgent. If its owner window has already been captured, we should capture its media content as well.
Bug 1228564 - part 2 : check audio capturing when the agent is registered/unregistered.
Duplicate of this bug: 1221916
Got some test cases fails, still trying to fix them.
Comment on attachment 8693455 [details]
MozReview Request: Bug 1228564 - part 1 : revert the changeset of bug 1190040. r=baku.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26469/diff/1-2/
Attachment #8693455 - Flags: review?(amarchesini)
Comment on attachment 8693456 [details]
MozReview Request: Bug 1228564 - part 2 : check audio capturing when the agent is registered/unregistered. r=baku.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26471/diff/1-2/
Attachment #8693456 - Flags: review?(amarchesini)
Duplicate of this bug: 1227078
Comment on attachment 8693456 [details]
MozReview Request: Bug 1228564 - part 2 : check audio capturing when the agent is registered/unregistered. r=baku.

https://reviewboard.mozilla.org/r/26471/#review25643

::: dom/base/nsGlobalWindow.cpp:1232
(Diff revision 2)
> -    Preferences::AddBoolVarCache(&sIdleObserversAPIFuzzTimeDisabled, 
> +    Preferences::AddBoolVarCache(&sIdleObserversAPIFuzzTimeDisabled,

revert all these changes and keep only what is needed for this patch.
If you want, file a follow up to remove the spaces.

::: dom/html/HTMLMediaElement.cpp:4744
(Diff revision 2)
> +  if (!HasAudio()) {

moved after mPaused || Muted() check
Attachment #8693456 - Flags: review?(amarchesini) → review+
Attachment #8693455 - Flags: review?(amarchesini) → review+
Comment on attachment 8693455 [details]
MozReview Request: Bug 1228564 - part 1 : revert the changeset of bug 1190040. r=baku.

https://reviewboard.mozilla.org/r/26469/#review25645
Comment on attachment 8693455 [details]
MozReview Request: Bug 1228564 - part 1 : revert the changeset of bug 1190040. r=baku.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26469/diff/2-3/
Attachment #8693455 - Attachment description: MozReview Request: Bug 1228564 - part 1 : revert the changeset of bug 1190040. → MozReview Request: Bug 1228564 - part 1 : revert the changeset of bug 1190040. r=baku.
Attachment #8693456 - Attachment description: MozReview Request: Bug 1228564 - part 2 : check audio capturing when the agent is registered/unregistered. → MozReview Request: Bug 1228564 - part 2 : check audio capturing when the agent is registered/unregistered. r=baku.
Comment on attachment 8693456 [details]
MozReview Request: Bug 1228564 - part 2 : check audio capturing when the agent is registered/unregistered. r=baku.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26471/diff/2-3/
Rebase patches.
Comment on attachment 8693455 [details]
MozReview Request: Bug 1228564 - part 1 : revert the changeset of bug 1190040. r=baku.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26469/diff/3-4/
Comment on attachment 8693456 [details]
MozReview Request: Bug 1228564 - part 2 : check audio capturing when the agent is registered/unregistered. r=baku.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26471/diff/3-4/
Keywords: checkin-needed
Comment on attachment 8693455 [details]
MozReview Request: Bug 1228564 - part 1 : revert the changeset of bug 1190040. r=baku.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26469/diff/4-5/
Comment on attachment 8693456 [details]
MozReview Request: Bug 1228564 - part 2 : check audio capturing when the agent is registered/unregistered. r=baku.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/26471/diff/4-5/
Keywords: checkin-needed
Blocks: 1204793
Blocks: 1227051
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/f96142e950e0 for Android M(4) failures:

E.g. https://treeherder.mozilla.org/logviewer.html#?job_id=19026021&repo=mozilla-inbound

08:03:06     INFO -  51 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | iframe.mute exists
08:03:06     INFO -  52 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | iframe.unmute exists
08:03:06     INFO -  53 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | iframe.getMuted exists
08:03:06     INFO -  54 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | iframe.getVolume exists
08:03:06     INFO -  55 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | iframe.setVolume exists
08:03:06     INFO -  56 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | allowedAudioChannels exist
08:03:06     INFO -  57 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | 1 audio channel by default
08:03:06     INFO -  58 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | Correct class
08:03:06     INFO -  59 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | ac.getVolume exists
08:03:06     INFO -  60 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | ac.setVolume exists
08:03:06     INFO -  61 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | ac.getMuted exists
08:03:06     INFO -  62 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | ac.setMuted exists
08:03:06     INFO -  63 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | ac.isActive exists
08:03:06     INFO -  64 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | undefined assertion name
08:03:06     INFO -  65 INFO Test : audio-muted-by-default
08:03:06     INFO -  66 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | allowedAudioChannels exist
08:03:06     INFO -  67 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | 1 audio channel by default
08:03:06     INFO -  68 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | Correct class
08:03:06     INFO -  69 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | ac.getMuted exists
08:03:06     INFO -  70 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | ac.setMuted exists
08:03:06     INFO -  71 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | activestatechanged event received.
08:03:06     INFO -  72 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | Muted channel by default
08:03:06     INFO -  73 INFO TEST-PASS | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | Unmuted the channel.
08:03:06     INFO -  74 INFO TEST-UNEXPECTED-FAIL | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | Test timed out.
08:03:06     INFO -      reportError@SimpleTest/TestRunner.js:114:7
08:03:06     INFO -      TestRunner._checkForHangs@SimpleTest/TestRunner.js:134:7
08:03:18     INFO -  75 INFO TEST-OK | dom/browser-element/mochitest/test_browserElement_inproc_AudioChannel.html | took 312972ms
Flags: needinfo?(alwu)
Flags: needinfo?(alwu)
Duplicate of this bug: 1232602
Summary: Check the audio capturing when we register the new AudioChannelAgent → Non audible object shouldn't register AudioChannelAgent and re-register audio capturing when we create new AudioChannelAgent
Duplicate of this bug: 1226023
This issue is Verified Fixed. I checked 3 of the 4 following duplicates: Bug 1226023 Bug 1227078 and Bug 1232602. 

Results: Issues described in the 3 bugs did not reproduce.

I did not check Bug 1221916 however as Qanalyst is unable to verify this issue specifically.
Status: RESOLVED → VERIFIED
Flags: needinfo?(ktucker)
This issue is Verified Fixed for Aries Master and Flame Master.
Result: The following duplicates do NOT reproduce: Bug 1226023 Bug 1227078 and Bug 1232602. 

Environmental Variables:
Device: Aries 2.6
BuildID: 20160105105910
Gaia: 78b2bc4cad3fcf83cbbbe4aeb77079cf956972cf
Gecko: 29258f59e5456a1a518ccce6b473b50c1173477e
Gonk: a19052e4389c3ae2d8fc3e7a74a475401baacc56
Version: 46.0a1 (2.6) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:46.0) Gecko/46.0 Firefox/46.0

Environmental Variables:
Device: Flame 2.6 Kk Fullflash (512mb)
BuildID: 20160105030240
Gaia: 78b2bc4cad3fcf83cbbbe4aeb77079cf956972cf
Gecko: 29258f59e5456a1a518ccce6b473b50c1173477e
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 46.0a1 (2.6) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:46.0) Gecko/46.0 Firefox/46.0

-----------------------------------------------------------------

This issue DOES occur on Flame 2.5.
Result: Music will stop when opening Camera app: Bug 1227078. This duplicated bug blocks me from being able to test Bug 1227078 and Bug 1226023.

Environmental Variables:
Device: Flame 2.5 Kk Fullflash (512mb)
BuildID: 20160105125513
Gaia: 50c5babe34fb2b055da34fdde6847aabffe73246
Gecko: d8517b54e27903b9f0a94d76470b4f8126e09eb0
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 44.0 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0
QA Whiteboard: [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
No longer blocks: 1245449
Duplicate of this bug: 1245449
You need to log in before you can comment on or make changes to this bug.