Open Bug 449336 Opened 16 years ago Updated 2 years ago

Only play sound from current tab/window for video/audio elements

Categories

(Core :: Audio/Video: Playback, enhancement)

x86
Windows XP
enhancement

Tracking

()

People

(Reporter: martijn.martijn, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

See also bug 334987, which is about all plugins.
But since with the video/audio element, the audio can be controlled easily, I've submitted this as a new bug.

Note that people might want to have exceptions to certain kind of pages, for example, if they have some music playing from a website.
It seems to me this could be solved by providing some ui for that and the use of site-specific preferences.
Summary: Only play sound from current tab/window for vidoe/audio elements → Only play sound from current tab/window for video/audio elements
Severity: normal → enhancement
Blocks: 334987
what if user want his/her favorite radio station to be played in background while he is working/browsing at a different site.
I agree with Biju use case. The default behaviour should be to play all sounds in every tab. Although there can be prefs for oposite behaviour.

People are used to it from every browser. I think nobody expects hidden page to stop working/scripting/playing.
Second use case is Gmail, which can play sound when new mail arrives or chat application that makes sound when someone write a message etc.
I don't see the point in implementing this only for the built-in video/audio, and not for plugins. Users (who couldn't care less what the difference is) wouldn't understand why the behavior is different.
I agree with Martin - too many cases shows that playing sounds from other tabs are useful. Especially, short signals shouldn't be blocked as it can be a mail notification etc. The only annoying thing is when another tab plays continuously, not just for a moment. And I don't see any not complicated way of discovering those long ones.

Maybe a special button "disable sounds from other tabs" to click when something annoys as? This button would apply only to current open tabs, new wouldn't be affected.

Anyway, maybe it's wiser just to leave it in the present state... At least until sb comes up with a better idea.
There should be an option to continue playing sound from a tab, because sometimes I want to listen to audio while browsing other sites.

Use cases: pandora, podcasts, youtube videos that I don't care about the video.

Maybe have the default setup play sound from only one tab, and the priority be the tab-order stack priority.
I have sounds set up on my windows 7 scheme with the volume fairly low but firefox is ignoring this setting. It used to be that Firefox didn't play menu popup and menu command sounds at all, I'm guessing that in recent versions this "Feature" was enabled. The problem is that when clicking through menus Firefox doesn't seem to respect the System Sounds volume setting in Windows 7, but instead uses the Firefox volume setting. When I mute or lower firefox volume in WIndows 7 volume mixer this effects all website and I'm forced to keep adjusting the volume every few minutes. This is not behavior I want from a browser so my goal is to COMPLETELY disallow FIREFOX from using sounds, not radio stations, youtube and the like. 

Are there any known changes "under the hood" that can be made now to accomplish my goal?
(In reply to comment #8)
> The problem is that when clicking through menus Firefox
> doesn't seem to respect the System Sounds volume setting in Windows 7, but
> instead uses the Firefox volume setting. 

This sounds like a problem with your Firefox theme, not with HTML audio/video. Firefox's default theme doesn't play sounds when browsing through menu items.
Thank you Chris for your reply. This sounds like a great place to start, I have theme "Default 3.6.8" with with "use Theme" and "Uninstall" grayed out. Any idea how to remove this feature?
Anyone else know how to keep Firefox from using theme sounds for menu popup and menu command? The only thing thats keeping me on firefox now is the no script add-on the the master password feature. I am so ready to switch to chrome since this new nagging sound feature was added to firefox... So Ready.
It's your OS that does it. If you don't like it, switch it off in the control panel. I don't see another bug report claiming that it doesn't work in Windows 7.

There are a few bugs about it, some have been fixed (bug 83056 for the menus for instance, but it wasn't particularly recent), others are still open (bug 461963 and dependencies).

But this has nothing to do with this bug.
My OS is Windows 7 Ultimate... my first thought was the OS so I disabled the Sound Scheme, double checked each program event to maked sure all were blank and even removed the check from "Play windows startup sound". That is why I say Firefox is Ignoring the windows sound scheme and I feel this is a bug. Perhaps Bug 83056 fix went too far.
There should be different audio classes - And they should be handled by the browser, not some script hacks, ie.
1) Background Streaming
2) Foreground Streaming
3) Foreground Sound Effects (*default)
4) Notification Sounds
So where do we start pushing this?
Dagelf, those sound like good suggestions. Perhaps this is something to be solved by the webAPI group: https://wiki.mozilla.org/WebAPI ?
Anyway, if one would provide a patch, that would fix this (and other things), that would be great.
Depends on: 728046
Blocks: 24418
No longer blocks: 334987
Component: Audio/Video → Audio/Video: Playback
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.