[whatwg] I have feature requests for <video> and <audio> tags.

Ian Hickson ian at hixie.ch
Tue Jun 5 14:42:08 PDT 2012


Oops, I found more e-mails on the thread to which I just asked for a use 
case, which gave a use case:

On Wed, 16 Nov 2011, crocket wrote:
>
> <video> and <audio> tags need volume attribute.
> 
> I know that it's possible to manipulate the volume attribute with 
> javascript. But many internet forums allow some HTML tags but prohibit 
> javascripts.
> 
> If I was able to set the initial volume with volume attribute of <video> 
> and <audio> tags, I would be able to set the initial volume without 
> javascript.

On Tue, 15 Nov 2011, Tab Atkins Jr. wrote:
> 
> You can currently mute the video or play it at the user's default 
> volume.  Why do you need to control it beyond that in the markup?

On Thu, 17 Nov 2011, crocket wrote:
>
> [...] most users don't know there is such a thing as user's default 
> volume. Even I don't know where to find that setting in firefox or 
> chrome. It seems to be a hidden configuration.
> 
> Plus, some audio files are too loud at 100% which is the default volume 
> for most users. Since uploaders know the proper initial volume, they 
> should be able to set the initial volume even without javascript.

On Wed, 16 Nov 2011, Glenn Maynard wrote:
> 
> Authors don't know how loud users want content to be.  If UI isn't 
> discoverable enough, the solution isn't to make every single author try 
> to work around it individually by overriding user settings.
> 
> Maybe there are valid use cases for exposing a volume attribute, but I 
> don't think this is one.

On Thu, 17 Nov 2011, Jonas Sicking wrote:
> 
> Authors do however know how loud the volume of the media is though. If a 
> video is encoded with a very loud volume, or a very quiet volume, it can 
> be quite useful to be able to adjust that up or down when linking to it.
> 
> To some extent the same is true for video brightness. It's not rare to 
> see images or video clips encoded too dark and you wish that you could 
> adjust the brigtness of the video up. Note that turning up the screen 
> bringness is not a great solution since as soon as you stop looking at 
> the image the user will turn down the brightness again which means that 
> the next time he/she views the image they'll have to go through the same 
> dance.

On Thu, 17 Nov 2011, Glenn Maynard wrote:
> 
> That sort of thing should probably be separate from the user-visible 
> volume control, though; more like ReplayGain, acting multiplicatively to 
> the user's volume, not changing it.

On Fri, 18 Nov 2011, Jonas Sicking wrote:
> 
> That's entirely possible, yeah.

On Thu, 17 Nov 2011, Ralph Giles wrote:
> 
> I was going to say, that sounds like user-agents should support 
> replay-gain tags. Note that expected line level is actually a required 
> header for the Opus codec's Off encapsulation.
> 
> However, relying on a replaygain tag in the media file does violate the 
> 'simple to author' goal of html.

In general, I would view problems with the encoded volume of a video as 
equivalent to problems with animated GIFs being too fast, PNGs having the 
wrong colour profile, videos having the wrong brightness setting, etc. 
Which is to say, the right solution is to fix the content. If we go down 
the road of having "fixup" features in HTML, we are going to open a 
pandora's box of fixup features.

Now, we _should_ support features that let you do audio, video, and image 
manipulation: features like Web Audio where you can pan the channels, 
change the volume, etc; features like Canvas where you can adjust image 
brightness, etc. But I don't think those should be at the level of content 
attributes on <video> to adjust the audio of poorly encoded videos. That 
doesn't scale.


On Wed, 16 Nov 2011, crocket wrote:
>
> 2) <video> tag needs subtitle attribute.
> 
> Without a subtitle attribute, people need to reencode videos with 
> subtitles to present the videos with subtitles on the web. I think 
> charset attribute for manually specifying subtitle's character set would 
> come in handy also.

On Tue, 15 Nov 2011, Tab Atkins Jr. wrote:
>
> Look at the <track> element, which does precisely this.

Indeed.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list