Closed Bug 1092859 Opened 8 years ago Closed 8 years ago

Changing HTML5 video volume alters system mixer settings (WinXP)


(Core :: Audio/Video, defect)

34 Branch
Windows XP
Not set



Tracking Status
firefox33 --- unaffected
firefox34 --- fixed
firefox35 --- fixed
firefox36 --- fixed


(Reporter: wip.the.gruik, Assigned: kinetik)



(Keywords: regression)


(1 file, 1 obsolete file)

Mozilla/5.0 (Windows NT 5.1; rv:34.0) Gecko/20100101 Firefox/34.0
Built from (34 beta 5 ?)
Fresh install, new profile, all add-ons disabled and no Flash installed.

Reproducible with Firefox 34 Beta, Aurora 35 and Nightly 36, on Windows XP only.
Not reproducible on Windows 7 or 8.1.

Steps to reproduce:
  - open any Youtube video, since Firefox 34 it should always use the HTML5 player
  - right-click to check the context menu, should be Youtube's one and not Flash's
  - since it is a new profile (no cookie), volume is set to 100%
  - open Windows "Volume Control" panel, check the "Wave" channel level, then close the panel
  - mute the video using the player controls
  - open back the "Volume Control" panel and check again the "Wave" channel level

Actual results:
The "Wave" channel level changed from current OS settings (50% in my case) to 100% then 0%.
In fact, the system mixer level follows the value of the HTML5 video player volume.

Expected results:
The "Wave" channel should not have changed. System settings must not be altered.

It is a regression from Firefox 33.
It is a nuisance exploitable by malwares and bad-behaving ads.

Worse case: opening an OGV video via file association opens Firefox as a player with the volume always set at 100%.

May be related to bug 1046814.
works for me on windows7 with 34beta and trunk, seems to be WindowsXP only.
Component: General → Video/Audio
Keywords: regression
Product: Firefox → Core
I'm getting this problem too (eg youtube), it's awful; doesn't happen with Chrome, but does with firefox.
Typically I'll have web video sound down not because it's too loud but because I don't want it to intrude on music I'm listening to; result - my music disappears too. XP SP3.
This'll be a regression from bug 1027713, I think.  XP only because later Windows versions use the WASAPI backend in libcubeb but XP uses the WinMM backend.  In the WinMM change for bug 1027713, the new volume API is used if the waveOut supports WAVECAPS_VOLUME, but I suspect that we always need to use soft volume on WinMM because even when WAVECAPS_VOLUME is supported the WinMM volume API adjusts the system PCM device, rather than a per-stream (or even per-app) setting...
Blocks: 1027713
Ever confirmed: true
Attached patch bug1092859_v0.patch (obsolete) — Splinter Review
Simple change: always use soft volume.

No try push yet because the tree is closed.
Assignee: nobody → kinetik
Attachment #8520268 - Flags: review?(padenot)
Franck and D Merrick, if you'd like to test this fix, there should be builds available at in a few hours.  Thanks!
(In reply to Matthew Gregan [:kinetik] from comment #6)
> Franck and D Merrick, if you'd like to test this fix, there should be builds
> available at

I mean:
Thanks Mat -
Just tried a youtube video ( ; at anything other than 100% it makes a terrifying and unlistenable gurgling sound, and it still plays sound even on mute and 0% !!
Comment on attachment 8520268 [details] [diff] [review]

Sorry!  Thanks for testing, it looks like there's a bug in the f32 sample format soft volume code.  Simple fix, I'll have a new try push up shortly.
Attachment #8520268 - Attachment is obsolete: true
Attachment #8520268 - Flags: review?(padenot)
Fix type/cast for f32 sample format in soft volume code.

Tested locally, works fine.  Pushed to try:

New builds for testing will show up at in a few hours.
Attachment #8520429 - Flags: review?(padenot)
Sorry for the delay.
I've just tested the second try build (b72ae6dd8ec8try-win32) and it works fine on Windows XP SP3.
Test cases : Youtube videos and drap'n drop of OGV movies.
Sound is OK, changing volume level is effective yet this doesn't alter the system mixer settings.
It's good, thanks.
Comment on attachment 8520429 [details] [diff] [review]

Review of attachment 8520429 [details] [diff] [review]:

Hrm, sorry about that.
Comment on attachment 8520429 [details] [diff] [review]

Review of attachment 8520429 [details] [diff] [review]:

Hrm, sorry about that.
Attachment #8520429 - Flags: review?(padenot) → review+ works good for me too, XP SP3 - thanks greatly for this!
Thanks for confirming the patch works!

Landed on inbound:
Comment on attachment 8520429 [details] [diff] [review]

Approval Request Comment
[Feature/regressing bug #]: bug 1027713
[User impact if declined]: web content can control system audio volume on Windows XP
[Describe test coverage new/current, TBPL]: tested locally and have fix confirmation from others
[Risks and why]: very low risk, fall back to soft volume code
[String/UUID change made/needed]: none
Attachment #8520429 - Flags: approval-mozilla-beta?
Attachment #8520429 - Flags: approval-mozilla-aurora?
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment on attachment 8520429 [details] [diff] [review]

Although this only landed on m-c recently, it was verified in comment 11 and comment 14. Taking for beta9.

Attachment #8520429 - Flags: approval-mozilla-beta?
Attachment #8520429 - Flags: approval-mozilla-beta+
Attachment #8520429 - Flags: approval-mozilla-aurora?
Attachment #8520429 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.