RE: <video> and <audio>

On Monday, September 07, 2009 6:33 AM, Anne van Kesteren wrote:
> On Tue, 01 Sep 2009 17:58:32 +0200, Adrian Bateman
> <adrianba@microsoft.com> wrote:
> > b) We have been discussing whether there is value in supporting
> > additional optional information on <source> elements. This would be
> used
> > to indicate properties of the media stream to provide more data for
> user
> > agents to choose between the different sources. Today, the <source>
> > element provides a combination of MIME type (including codecs
> parameter)
> > and media query to determine the available sources. We think an
> > interesting use case is one where two sources use the same codecs but
> > are encoded with different properties. For example, they may have
> > different bit rates. Alternatively, two audio sources may be in
> > different languages. We're still actively debating this but would
> > welcome feedback on this idea.
> 
> Some of this might make sense as extensions (likely in the form of media
> features) to Media Queries rather than the <source> element. I.e. the
> ability to download faster is a property of the device/environment in
> some way.

I agree that adding some of these properties as media features is a good idea.
However, I'm not sure if requiring web developers to form this into a media
query is the best approach. In particular, the user agent may be in a better
position to make a judgement about the device/environment than the author of
the page.

Using media queries, a web developer would have to write something like:

<video ...>
  <source src="video64.mp4" type="video/mp4" media="max-networkbandwidth:256">
  <source src="video192.mp4" type="video/mp4" media="min-networkbandwidth:256">
</video>

However, this means the web developer has to make the judgement about where
the best switchover point is without knowing what else the device is doing.
In this case we guess that if the device has a network bandwidth of 256kbps
then it should play the 192kbps stream.

<video ...>
  <source src="video64.mp4" type="video/mp4" feature="mediabandwidth:64">
  <source src="video192.mp4" type="video/mp4" feature="mediabandwidth:192">
</video>

In this example, the author is simply indicating the features of the media
source and the user agent can determine which is best to play. Knowing that
the user is currently also downloading a file in the background, it could
choose the lower bandwidth file. Alternatively, a user setting could
influence which one to choose based on preference.

Cheers,

Adrian.

Received on Tuesday, 8 September 2009 16:48:34 UTC