Re: Do not remove the media attribute from the source element

On 11/02/2014 12:06, Ian Devlin wrote:
> In the bug report some usage data has been provided which indicates that
> this attribute has not been used much, and this data was used in making
> the decision to remove it.
>
> I will admit to not having any any counter data to this but I disagree
> with this attribute being "useless" and I have always thought that not
> enough people know about this attribute, its implementation and what it
> can do.

Some anecdotal fun: when I was still doing DevRel work for Opera, I 
actually started to demonstrate the use of the attribute during HTML5 
presentations. See for instance 
http://patrickhlauke.github.io/web-standards/video/mediaquery/
Feedback from developers was that they'd never heard of that attribute 
being advertised/explained in any of the HTML5 audio/video articles 
they'd seen in wide circulation, and found it quite an intriguing 
possibility for some common scenarios (with the caveat that viewport 
size does not necessarily say anything about bandwidth etc).

...and just a few weeks later, the attribute was declared "useless". I'd 
posit that the "not used much" argument comes mainly from the fact that 
it was already made an at-risk attribute while <audio>/<video> was still 
only tentatively being adopted anyway.

> An argument against the attribute's usefulness has been put forth in the
> bug thread stating that it isn't responsive and doesn't react to changes
> in the browser size etc. Whilst this is true, I think that it is a moot
> point given the problem that the media attribute is used to solve.
>
> If you use the media attribute to serve a lower quality video with
> smaller file size based on a smaller screen size (based on the oft used
> assumption that a smaller browser width probably means a mobile device
> and lower bandwith - we all know this is not that accurate but we
> developers use it all the time) you are not going to want to serve a
> larger, higher quality video file when/if the user flips their device
> into landscape mode. Nor will the user be resizing their browser.
>
> At the moment the media attribute is the only native way to serve
> smaller audio and video files to smaller browser sizes. Indeed it could
> be used to only serve an audio or video file when the browser size is
> above certain dimensions, and coupled with a "normal" media query which
> hides the video/audio element, not serve audio or video at all and thus
> preventing an unwanted http request.
>
> I think that the media attribute should remain in the specification and
> we need to do more to advertise its existence, availablity, and
> functionality.

Or provide some other form of responsive media selection that does not 
require adaptive streaming backends or lots of custom-crafted JavaScript 
that feature/environment-detects and then rewrites src attributes...

P
-- 
Patrick H. Lauke
______________________________________________________________
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]

www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com | http://flickr.com/photos/redux/
______________________________________________________________
twitter: @patrick_h_lauke | skype: patrick_h_lauke
______________________________________________________________

Received on Tuesday, 11 February 2014 12:34:08 UTC