[whatwg] audio and video: volume and muted as content attributes?
Silvia Pfeiffer
silviapfeiffer1 at gmail.com
Mon May 31 15:46:47 PDT 2010
On Tue, Jun 1, 2010 at 8:37 AM, Aryeh Gregor <Simetrical+w3c at gmail.com> wrote:
> On Mon, May 31, 2010 at 7:33 AM, Silvia Pfeiffer
> <silviapfeiffer1 at gmail.com> wrote:
>> I just came across a curious situation in the spec: IIUC, it seems the
>> @volume and @muted attributes are only IDL attributes and not content
>> attributes. This means that an author who is creating an audio-visual
>> Webpage has to use JavaScript to turn down (or up) the loudness of
>> their media elements or mute them rather than just being able to
>> specify this through content attributes.
>
> I assume the point of these IDL attributes is to allow you to give the
> user custom volume and mute buttons. If you want to mute the video or
> change its volume non-dynamically, you could just edit the video file,
> so HTML doesn't need to replicate that functionality -- only
> JavaScript does, for changes in response to user input.
I have no issues with @volume and @muted being IDL attributes - it is
important to be able to change them from script. What I am wondering
is why they cannot also be content attributes. I don't think that
would put an extra implementation burden on Web browsers and it would
really help with markup simplicity.
Also, the suggestion to edit the media resource just to change the
loudness seems inappropriate. What if I am referencing a resource that
is not on a server that I control?
I really don't think introducing these as content attributes creates
additional complexity in browsers - seeing as most already offer the
muting functionality in context menus and the default controls already
implement volume control. Since it comes for cheap and it offers quite
a substantial simplification for Web authors, my suggestion is to give
them content attribute status.
Regards,
Silvia.
More information about the whatwg
mailing list