Closed Bug 606926 Opened 14 years ago Closed 11 years ago

HTML5 states are not remembered across sessions (i.e. volume, muted)

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 497164

People

(Reporter: starkov.egor, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.5
Build Identifier: 

Html5 media volume should be remembered across different pages.

Reproducible: Always

Steps to Reproduce:
1. Navigate to any page containing html5 video or audio.
2. Set volume to 50% or mute.
3. Navigate to any other page with html5 video or audio.
4. Check volume attribute.

Actual Results:  
Video or audio volume is set to 100% again. The volume state has NOT been
remembered while switching between the pages.

Expected Results:  
The volume state should be remembered while switching between the pages.
Attached patch fixSplinter Review
Attachment #485698 - Flags: review?(chris.double)
Comment on attachment 485698 [details] [diff] [review]
fix

Thanks for the patch but I don't think this is the right approach.

Volume settings on audio and video elements are 'per element'. I would not expect muting one video to mute all videos that are created from that point on.

Imagine a game that mutes one sound, and creates another audio element to play another. It should not expect that audio element to be muted due to muting the first one. 

This changes the behavior of the audio/video elements such that it is not compatible with the spec and other implementations.

To address the use case you want I'd expect some global volume and mute controls for the browser. Then all video and audio element volume settings happen within the constraints of that.

So if I set browser volume to 0.5, then a video volume of 1.0 plays at a volume of 0.5.
Attachment #485698 - Flags: review?(chris.double) → review-
(In reply to comment #2)
> Comment on attachment 485698 [details] [diff] [review]

This patch behaves the way that if you have 3 videos opened, you watch one video and set volume to 50% all other opened videos will keep theirs volume same, but all new videos will have latest set volume - 50%.

General browser volume and mute is good approach, but i guess it needs separate control or something. Is there any in specs?
(In reply to comment #3)
> This patch behaves the way that if you have 3 videos opened, you watch one
> video and set volume to 50% all other opened videos will keep theirs volume
> same, but all new videos will have latest set volume - 50%.

Yes, but video and audio elements aren't just used for 'youtube' style video playback. They're also used for games, interesting effects, etc. I think the solution proposed by this patch will break those usages.

> General browser volume and mute is good approach, but i guess it needs separate
> control or something. Is there any in specs?

Yes, it'll need some browser chrome solution. This sort of thing isn't covered by the specs as it doesn't specify UI behavior of browsers. 

There has been discussion in the WHATWG mailing list about per volume vs global volume control. You might want to search through there and see some of the proposals and ideas.
The most annoying thing about the default 100% volume setting is the possible big noise when the video starts, before we have time to set the correct value. May the default 100% value be changed for a bit lower, for example 70%.
The spec calls for the volume to default to 1.0, so defaulting to 0.7 isn't possible without changing (or violating) the spec.  It used to default to 0.5, but it was changed after some discussion on the WhatWG mailing list.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: