Sound is briefly audible in tab even if the tab is muted
Categories
(Core :: Web Audio, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: 684sigma, Assigned: alwu)
References
Details
Attachments
(9 files, 1 obsolete file)
560 bytes,
application/x-javascript
|
Details | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
I have a problem with Firefox Beta 52. It also happens in ESR 45. Sometimes sound is briefly audible in tab even if the tab is muted (Ctrl+M). It happens unpredictably, however, I noticed one specific scenario when it happens 1. Open http://lagged.com/play/352/ , wait until advertisement finishes 2. Enable sound in the game 3. Disable sound in the game, mute tab, enable sound in the game Result: Sound is briefly audible Expected: NO SOUND Other examples http://lagged.com/play/352/ http://lagged.com/play/535/ http://lagged.com/play/571/
Comment 1•7 years ago
|
||
jw, can you look at this or forward it to someone? thanks
Comment 2•7 years ago
|
||
Looks like an audio channel/indicator issue.
An easier way to reproduce the bug: 1. Open https://mdn.github.io/webaudio-examples/decode-audio-data/ 2. Execute attached JavaScript code 3. Click "Play" button on the page. When audio starts, click "Reconnect" button on the page. 4. Click "Mute" button on the page 5. Mute tab, click "Unmute" button on the page, unmute tab.
Jean-Yves - I can repro this on Windows and Linux. It seems odd that there is a similar Flash relate issue. Can you investigate this issue?
Assignee | ||
Comment 5•7 years ago
|
||
After checking, the audio channel part works well, it indeed mute the AudioDestinationNode in [1]. We set the |aMute=true|, so finally the volume of the audio output would be zero. I think it might be web audio's bug? [1] https://goo.gl/owmIPF
Assignee | ||
Comment 7•7 years ago
|
||
Per comment5, change module to web audio.
Comment 8•7 years ago
|
||
I can't repro on Linux. Alastor, can you still repro ?
Assignee | ||
Comment 9•7 years ago
|
||
Yes, I can still reproduce this issue with Nightly 57.0a1 on OSX 10.11.4 and Windows7. If it's platform dependency problem, maybe it's related with cubeb?
Comment 10•7 years ago
|
||
ah I can repro somehow I was not following the instructions accurately. I can also repro on Linux.
Updated•7 years ago
|
Comment 11•7 years ago
|
||
Mass change P1->P2 to align with new Mozilla triage process
Comment 12•6 years ago
|
||
Moving to p3 because no activity for at least 1 year(s). See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Comment 14•5 years ago
|
||
Same issue when watching ChannelOne from mixer.com and the hosted channel switches.
Full context for comprehension of the above lingo:
- Mixer is a streaming platform similar to twitch
- A channel is the stream of a given user
- Hosting a channel is a feature that means mirroring their content on another channel
- ChannelOne is a channel run by mixer themselves which hosts other channels 24/7 and switches to a different one every 15 minutes or so.
It doesn’t happen on every switch but it happens maybe once an hour.
Comment 15•5 years ago
|
||
I can reproduce this deterministically on lichess.
Windows 10 (up-to-date, 1903 build 18362.476) in Firefox 70.0.1 (64-bit) and I just confirmed the behavior happens in Nightly as well.
Step 1:
Visit https://lichess.org/analysis/standard
Step 2:
Mute tab (CTRL M), confirm that muted icon appears on the right of the tab.
Step 3:
Make a valid chess move. A clicking sound will happen once the piece is moved. Make more valid chess moves. No more sounds from here on.
If you un-mute and mute the tab again, the similar behavior of only the first move making sound will recur.
Comment 16•5 years ago
|
||
Ah superb, I can repro now, will fix. Thank you very much.
Updated•5 years ago
|
Comment 17•4 years ago
|
||
I can reproduce on Firefox 78, with a clean profile on Linux:
- Visit https://findtheinvisiblecow.com
- Mute the tab
- Click "Start game"
The sound is audible for a fraction of a second when you click "start game".
Comment 18•4 years ago
|
||
I can't find time to have a look at this. Can you have a look?
Assignee | ||
Comment 19•4 years ago
|
||
Sure, I will check this after finishing other works I'm doing, keep NI.
Updated•4 years ago
|
Comment 20•4 years ago
|
||
Comment 21•4 years ago
|
||
Comment 22•4 years ago
|
||
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4e7a614b30f8 Always initialize an AudioChannelAgent when initializing an AudioContext. r=alwu https://hg.mozilla.org/integration/autoland/rev/7c0018c583b5 Test that a muted tab that plays audio via the Web Audio API is really muted using PulseAudio monitoring devices. r=pehrsons,alwu
Comment 23•4 years ago
|
||
Backed out for causing audio failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/4ff89c0769c4adbdaf8a4adc516cf76a49c78c27
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunning%2Cpending%2Crunnable&revision=7c0018c583b5d9ba143f57bb4107389970361cc6
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=318991273&repo=autoland&lineNumber=3044
TEST-PASS | dom/base/test/browser_timeout_throttling_with_audio_playback.js | Got the correct timeout (10) -
[task 2020-10-19T09:30:03.991Z] 09:30:03 INFO - Console message: [JavaScript Error: "TypeError: can't access property "audioPlaybackStopped", browser is null" {file: "resource://gre/actors/AudioPlaybackParent.jsm" line: 24}]
[task 2020-10-19T09:30:03.991Z] 09:30:03 INFO - receiveMessage@resource://gre/actors/AudioPlaybackParent.jsm:24:9
[task 2020-10-19T09:30:03.992Z] 09:30:03 INFO -
[task 2020-10-19T09:30:03.992Z] 09:30:03 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://mochi.test:8888/browser/dom/base/test/empty.html" line: 0}]
[task 2020-10-19T09:30:03.992Z] 09:30:03 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://mochi.test:8888/browser/dom/base/test/file_webaudio_startstop.html" line: 0}]
[task 2020-10-19T09:30:03.993Z] 09:30:03 INFO - Buffered messages finished
[task 2020-10-19T09:30:03.993Z] 09:30:03 INFO - TEST-UNEXPECTED-FAIL | dom/base/test/browser_timeout_throttling_with_audio_playback.js | Test timed out -
[task 2020-10-19T09:30:03.994Z] 09:30:03 INFO - GECKO(2058) | MEMORY STAT | vsize 3375MB | residentFast 313MB | heapAllocated 86MB
[task 2020-10-19T09:30:03.994Z] 09:30:03 INFO - TEST-OK | dom/base/test/browser_timeout_throttling_with_audio_playback.js | took 45012ms
[task 2020-10-19T09:30:03.996Z] 09:30:03 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-10-19T09:30:03.996Z] 09:30:03 INFO - TEST-UNEXPECTED-FAIL | dom/base/test/browser_timeout_throttling_with_audio_playback.js | Found a tab after previous test timed out: http://mochi.test:8888/browser/dom/base/test/file_webaudio_startstop.html -
[task 2020-10-19T09:30:03.997Z] 09:30:03 INFO - checking window state
[task 2020-10-19T09:30:03.997Z] 09:30:03 INFO - TEST-START | dom/base/test/browser_use_counters.js
Assignee | ||
Comment 24•4 years ago
|
||
Assignee | ||
Comment 25•4 years ago
|
||
Assignee | ||
Comment 26•4 years ago
|
||
Assignee | ||
Comment 27•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 29•4 years ago
|
||
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60a7c181809b part1 : keep AudioChannelAgent alive all the time for not offline context. r=padenot https://hg.mozilla.org/integration/autoland/rev/c5234d9f7e94 part2 : consider output volume for engine when it determines the audible state. r=padenot https://hg.mozilla.org/integration/autoland/rev/784fd3ab527d part3 : add a browser sound indicator test for web audio audibility. r=padenot https://hg.mozilla.org/integration/autoland/rev/21632db91729 part4 : modify current tests. r=padenot https://hg.mozilla.org/integration/autoland/rev/17088afb6337 Test that a muted tab that plays audio via the Web Audio API is really muted using PulseAudio monitoring devices. r=pehrsons,alwu
Comment 30•4 years ago
|
||
Backed out for failures on browser_ProcessPriorityManager.js
backout: https://hg.mozilla.org/integration/autoland/rev/f697ed1b844e9fb929c202a6a2f32b92d9fb9567
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=319473422&repo=autoland&lineNumber=3103
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - TEST-PASS | dom/ipc/tests/browser_ProcessPriorityManager.js | Should have seen no process priority change for a browser at http://example.com/ - null == null -
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - Browser at: about:blank transitioning to FOREGROUND
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - Leaving test bound test_audio_background_tab
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - Entering test bound test_audio_background_tab
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - Browser at: about:blank transitioning to FOREGROUND
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - Browser at: about:blank transitioning to BACKGROUND
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - Console message: [JavaScript Error: "TypeError: can't access property "audioPlaybackStopped", browser is null" {file: "resource://gre/actors/AudioPlaybackParent.jsm" line: 24}]
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - receiveMessage@resource://gre/actors/AudioPlaybackParent.jsm:24:9
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO -
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - TEST-PASS | dom/ipc/tests/browser_ProcessPriorityManager.js | Tabs should be running in separate processes. - 3336 != 11060 -
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - Browser at: about:blank transitioning to FOREGROUND
[task 2020-10-22T23:13:33.985Z] 23:13:33 INFO - Browser at: http://example.com/ transitioning to BACKGROUND
[task 2020-10-22T23:13:33.986Z] 23:13:33 INFO - Browser at: http://example.com/ transitioning to FOREGROUND
[task 2020-10-22T23:13:33.986Z] 23:13:33 INFO - TEST-PASS | dom/ipc/tests/browser_ProcessPriorityManager.js | Browser at about:blank reached expected priority: FOREGROUND - true == true -
[task 2020-10-22T23:13:33.986Z] 23:13:33 INFO - Buffered messages finished
[task 2020-10-22T23:13:33.986Z] 23:13:33 INFO - TEST-UNEXPECTED-FAIL | dom/ipc/tests/browser_ProcessPriorityManager.js | Should have seen no process priority change for a browser at http://example.com/ - "FOREGROUND" == null - JS frame :: chrome://mochitests/content/browser/dom/ipc/tests/browser_ProcessPriorityManager.js :: ensureNoPriorityChange :: line 106
[task 2020-10-22T23:13:33.986Z] 23:13:33 INFO - Stack trace:
[task 2020-10-22T23:13:33.986Z] 23:13:33 INFO - chrome://mochitests/content/browser/dom/ipc/tests/browser_ProcessPriorityManager.js:ensureNoPriorityChange:106
[task 2020-10-22T23:13:33.986Z] 23:13:33 INFO - TEST-PASS | dom/ipc/tests/browser_ProcessPriorityManager.js | Tabs should be running in separate processes. - 11060 != 3336 -
Comment 31•4 years ago
|
||
Also failing on TV: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=319437223&repo=autoland&lineNumber=2164 with TEST-UNEXPECTED-FAIL | toolkit/content/tests/browser/browser_media_wakelock.js | Test timed out -
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 32•4 years ago
|
||
Hmm, I'm not sure that browser_ProcessPriorityManager.js
issue is caused by me, because I've updated my codebase to latest central, and run that test on my local environment without having any of my patches. The failure still happened. Let me debug more to see what I can find.
Assignee | ||
Comment 33•4 years ago
|
||
Ok, that test can only be tested on Windows, I was testing it on MacOS. I will move to my Windows machine and see what happened.
Assignee | ||
Comment 34•4 years ago
•
|
||
I can confirm browser_ProcessPriorityManager.js
would still fail on the latest m-c on Windows without applying my patches, and I've checked the test itself, it's apparently not related with my change at all.
browser_media_wakelock.js
also works well on my local environment. In the try result [1], we can see no above failures happened. I believe that was a false backout.
Comment 35•4 years ago
|
||
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/086261148f93 part1 : keep AudioChannelAgent alive all the time for not offline context. r=padenot https://hg.mozilla.org/integration/autoland/rev/5feb52637f9f part2 : consider output volume for engine when it determines the audible state. r=padenot https://hg.mozilla.org/integration/autoland/rev/0d4801868a6c part3 : add a browser sound indicator test for web audio audibility. r=padenot https://hg.mozilla.org/integration/autoland/rev/26d44e5e139d part4 : modify current tests. r=padenot https://hg.mozilla.org/integration/autoland/rev/5cf07d575830 Test that a muted tab that plays audio via the Web Audio API is really muted using PulseAudio monitoring devices. r=pehrsons,alwu
Assignee | ||
Comment 36•4 years ago
|
||
Hmm, on the autoland, we got another different problem from comment31 which is the browser_media_wakelock.js
running to long [1]. I will file another bug to handle that issue.
Comment 37•4 years ago
|
||
Backed out 5 changesets (bug 1346880) for browser_ProcessPriorityManager.js failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/6e838289f9741e9ba7aaf7d58397adec92d15488
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=319592161&repo=autoland&lineNumber=4149
...
[task 2020-10-23T21:58:50.116Z] 21:58:50 INFO - Browser at: about:blank transitioning to BACKGROUND
[task 2020-10-23T21:58:50.116Z] 21:58:50 INFO - Console message: [JavaScript Error: "TypeError: can't access property "audioPlaybackStopped", browser is null" {file: "resource://gre/actors/AudioPlaybackParent.jsm" line: 24}]
[task 2020-10-23T21:58:50.116Z] 21:58:50 INFO - receiveMessage@resource://gre/actors/AudioPlaybackParent.jsm:24:9
[task 2020-10-23T21:58:50.116Z] 21:58:50 INFO -
[task 2020-10-23T21:58:50.116Z] 21:58:50 INFO - TEST-PASS | dom/ipc/tests/browser_ProcessPriorityManager.js | Tabs should be running in separate processes. - 10548 != 10644 -
[task 2020-10-23T21:58:50.116Z] 21:58:50 INFO - Browser at: about:blank transitioning to FOREGROUND
[task 2020-10-23T21:58:50.116Z] 21:58:50 INFO - Browser at: http://example.com/ transitioning to BACKGROUND
[task 2020-10-23T21:58:50.116Z] 21:58:50 INFO - Browser at: http://example.com/ transitioning to FOREGROUND
[task 2020-10-23T21:58:50.117Z] 21:58:50 INFO - TEST-PASS | dom/ipc/tests/browser_ProcessPriorityManager.js | Browser at about:blank reached expected priority: FOREGROUND - true == true -
[task 2020-10-23T21:58:50.117Z] 21:58:50 INFO - Buffered messages finished
[task 2020-10-23T21:58:50.117Z] 21:58:50 INFO - TEST-UNEXPECTED-FAIL | dom/ipc/tests/browser_ProcessPriorityManager.js | Should have seen no process priority change for a browser at http://example.com/ - "FOREGROUND" == null - JS frame :: chrome://mochitests/content/browser/dom/ipc/tests/browser_ProcessPriorityManager.js :: ensureNoPriorityChange :: line 106
[task 2020-10-23T21:58:50.117Z] 21:58:50 INFO - Stack trace:
[task 2020-10-23T21:58:50.117Z] 21:58:50 INFO - chrome://mochitests/content/browser/dom/ipc/tests/browser_ProcessPriorityManager.js:ensureNoPriorityChange:106
[task 2020-10-23T21:58:50.117Z] 21:58:50 INFO - TEST-PASS | dom/ipc/tests/browser_ProcessPriorityManager.js | Tabs should be running in separate processes. - 10644 != 10548 -
[task 2020-10-23T21:58:50.117Z] 21:58:50 INFO - Browser at: about:blank transitioning to BACKGROUND
...
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 38•4 years ago
|
||
To prevent sheriff for cc paul for the backout again.
Assignee | ||
Comment 39•4 years ago
•
|
||
So last Friday I indeed saw the failure happened on my m-c without applying any of my patches, and the fail part was test_video_background_tab
which is not relevant with my patches. However, I ran the test again today, it didn't fail (?), even if I added my patches, the test still passed on my local environment, which is really weird...
Anyway, I will update new patches later to (1) fix the possible test timeout by refactoring browser_media_wakelock.js
(bug 1522361) (2) fix the weird failure (which seems timing issue) for browser_ProcessPriorityManager.js
.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 40•4 years ago
|
||
Separate the media playback and web audio tests for wakelock, which can prevent running a time too long and hitting the error (bug 1522361) and increase test readability because some check conditions would only work for one side, which would be nonecessary for another side.
Assignee | ||
Comment 41•4 years ago
|
||
This patch would further improve the readability for wakelock test by doing following things.
-
refactor
getWakeLockState()
and rename it towaitForExpectedWakeLockState()
In the origin test, we have to create a wakelock sentinel object beforehand, and then callcheck()
later, which is not really intuitive. Refactor that function to allow us to use it easier. -
use const variables to store the wakelock topic (audio-playing/video-playing)
-
add a helper function
ensureNeverAcquireVideoWakelock()
to clearly indicate we won't accquire video wakelock for web audio
Assignee | ||
Comment 42•4 years ago
|
||
Comment 43•4 years ago
|
||
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb9c32faa3e6 part1 : keep AudioChannelAgent alive all the time for not offline context. r=padenot https://hg.mozilla.org/integration/autoland/rev/a56fc7ee5a04 part2 : consider output volume for engine when it determines the audible state. r=padenot https://hg.mozilla.org/integration/autoland/rev/0468d60ac301 part3 : add a browser sound indicator test for web audio audibility. r=padenot https://hg.mozilla.org/integration/autoland/rev/4b4625dd460e part4 : modify current tests. r=padenot https://hg.mozilla.org/integration/autoland/rev/767598d1e453 part5 : test that a muted tab that plays audio via the Web Audio API is really muted using PulseAudio monitoring devices. r=pehrsons,alwu https://hg.mozilla.org/integration/autoland/rev/4d9b9f483e03 part6 : separate media playback and web audio test for wakelock. r=padenot https://hg.mozilla.org/integration/autoland/rev/62fe8bb937c2 part7 : further improve the readability for wakelock test. r=padenot https://hg.mozilla.org/integration/autoland/rev/c938f6fd4656 part8 : ensure audio context is already running before doing next step. r=padenot
Comment 44•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eb9c32faa3e6
https://hg.mozilla.org/mozilla-central/rev/a56fc7ee5a04
https://hg.mozilla.org/mozilla-central/rev/0468d60ac301
https://hg.mozilla.org/mozilla-central/rev/4b4625dd460e
https://hg.mozilla.org/mozilla-central/rev/767598d1e453
https://hg.mozilla.org/mozilla-central/rev/4d9b9f483e03
https://hg.mozilla.org/mozilla-central/rev/62fe8bb937c2
https://hg.mozilla.org/mozilla-central/rev/c938f6fd4656
Assignee | ||
Updated•4 years ago
|
Description
•