Intent to Deprecate and Remove: media="" from <source>

224 views
Skip to first unread message

Philip Jägenstedt

unread,
Jan 23, 2014, 10:14:23 PM1/23/14
to blink-dev

Primary eng (and PM) emails

phi...@opera.com


Summary

Remove the media content attribute from the resource selection algorithm:

http://whatwg.org/html#concept-media-load-algorithm


I am not requesting removal of the media IDL attribute on HTMLSourceElement.


Motivation

This feature has extremely low usage and will likely be removed from the spec if some browser removes support:

https://groups.google.com/a/chromium.org/d/msg/blink-dev/QPzFOX3032w/6TxeCtXtafMJ


Usage information from UseCounter

Non-matching media attributes (SourceElementNonMatchingMedia) were encountered in the resource selection algorithm on 0.00003% of pages.


We don't have a counter for HTMLSourceElement.media, but I will add one so that it too can be removed ASAP.


Compatibility Risk

A different source may be selected, which is likely of another resolution, bitrate, etc. Since the next source is tried if decoding fails, there should not be any case where no usable source at all is found.


Row on feature dashboard?

No.


Requesting approval to remove too?

Yes.

John Mellor

unread,
Jan 24, 2014, 12:41:59 AM1/24/14
to Philip Jägenstedt, blink-dev
Playing devil's advocate: while adaptive streaming is an excellent replacement for width/height/resolution media queries, there are some others that could conceivably be relevant to video source selection, like color/monochrome (serve grayscale video to devices without color screens) and aspect-ratio (serve alternate "portrait" video to portrait phones/tablets). And a possible future media query distinguishing stereo from surround sound-capable devices might be useful for audio source selection. Though it seems everyone uses JavaScript for video source selection anyway these days, so it probably doesn't matter so much...

Kenneth Rohde Christiansen

unread,
Jan 24, 2014, 3:02:36 AM1/24/14
to John Mellor, Philip Jägenstedt, blink-dev
> Non-matching media attributes (SourceElementNonMatchingMedia) were encountered in the resource selection algorithm on 0.00003% of pages.

How many pages use the source tag? It would be nice to see the value
relative to that instead.

Kenneth
> To unsubscribe from this group and stop receiving emails from it, send an
> email to blink-dev+...@chromium.org.



--
Kenneth Rohde Christiansen
Web Platform Architect, Intel Corporation.
Phone +45 4294 9458 ﹆﹆﹆

Philip Jägenstedt

unread,
Jan 24, 2014, 3:41:52 AM1/24/14
to Kenneth Rohde Christiansen, John Mellor, blink-dev
On Fri, Jan 24, 2014 at 3:02 PM, Kenneth Rohde Christiansen
<kenneth.ch...@gmail.com> wrote:
>> Non-matching media attributes (SourceElementNonMatchingMedia) were encountered in the resource selection algorithm on 0.00003% of pages.
>
> How many pages use the source tag? It would be nice to see the value
> relative to that instead.

I added the SourceElementCandidate counter at the same time to get an
idea about this:

SourceElementCandidate 0.21%
SourceElementNonMatchingMedia 0.00003%

So something like 0.00014% of pages that have a <source> element
considered in the resource selection algorithm also have a <source>
element rejected because of the media="" attribute.

Philip

Glenn Adams

unread,
Jan 24, 2014, 6:59:39 AM1/24/14
to Philip Jägenstedt, Kenneth Rohde Christiansen, John Mellor, blink-dev
Since the source element is itself new, and does not yet appear in a final (i.e., REC) W3C spec, but only one that is a candidate recommendation (CR), I have to wonder if it is premature to remove the feature. Normally, the CR phase is intended to generate implementations, and not generate deprecations, since usage of a feature can sometimes take time.

In any case, I think this raises a more general question of how much time should reasonably allowed to pass on a new feature before evaluating its usage.


Simon Pieters

unread,
Jan 24, 2014, 7:20:35 AM1/24/14
to John Mellor, Kenneth Rohde Christiansen, Philip Jägenstedt, blink-dev
On Fri, 24 Jan 2014 09:02:36 +0100, Kenneth Rohde Christiansen
<kenneth.ch...@gmail.com> wrote:

>> Non-matching media attributes (SourceElementNonMatchingMedia) were
>> encountered in the resource selection algorithm on 0.00003% of pages.
>
> How many pages use the source tag? It would be nice to see the value
> relative to that instead.

That can be a bit misleading since some pages use <source> without
<audio>/<video>.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19619#c19

--
Simon Pieters
Opera Software

Simon Pieters

unread,
Jan 24, 2014, 9:33:30 AM1/24/14
to Philip Jägenstedt, Glenn Adams, Kenneth Rohde Christiansen, John Mellor, blink-dev
On Fri, 24 Jan 2014 12:59:39 +0100, Glenn Adams <gl...@skynav.com> wrote:

> Since the source element is itself new, and does not yet appear in a
> final
> (i.e., REC) W3C spec, but only one that is a candidate recommendation
> (CR),
> I have to wonder if it is premature to remove the feature. Normally, the
> CR
> phase is intended to generate implementations, and not generate
> deprecations, since usage of a feature can sometimes take time.

I think it is not useful to involve W3C Process here.

> In any case, I think this raises a more general question of how much time
> should reasonably allowed to pass on a new feature before evaluating its
> usage.

I think Philip's Motivation statement is misleading. The low usage wasn't
the original motivation to remove it from the spec. It was realizing that
it is a bad at solving the problem it appears to try to solve. See:

http://lists.w3.org/Archives/Public/public-whatwg-archive/2012May/0171.html
http://lists.w3.org/Archives/Public/public-whatwg-archive/2012May/0290.html

The low usage just means that it is possible to remove it without breaking
the Web.

Philip Jägenstedt

unread,
Jan 24, 2014, 10:05:58 AM1/24/14
to Simon Pieters, Glenn Adams, Kenneth Rohde Christiansen, John Mellor, blink-dev
As usual, I agree with everything Simon said. I'll also add that this
feature isn't new, it's been in spec and implementations for years.
Yet, the use counter data shows *extremely* low usage non-matching
usage, which is the only case where the feature makes it presence
known. If the feature were promising I wouldn't be so keen on removal,
but it isn't and the low usage gives us a rare chance to simplify.

Philip

Kenneth Rohde Christiansen

unread,
Jan 24, 2014, 10:14:37 AM1/24/14
to Philip Jägenstedt, Simon Pieters, Glenn Adams, John Mellor, blink-dev
lgtm to remove given the argumentation given.

Kenneth

Ojan Vafai

unread,
Jan 24, 2014, 1:36:55 PM1/24/14
to Kenneth Rohde Christiansen, Philip Jägenstedt, Simon Pieters, Glenn Adams, John Mellor, blink-dev
lgtm

Tab Atkins Jr.

unread,
Jan 24, 2014, 1:50:35 PM1/24/14
to Ojan Vafai, Kenneth Rohde Christiansen, Philip Jägenstedt, Simon Pieters, Glenn Adams, John Mellor, blink-dev
lgtm

Eric Seidel

unread,
Jan 24, 2014, 4:15:45 PM1/24/14
to Tab Atkins Jr., Ojan Vafai, Kenneth Rohde Christiansen, Philip Jägenstedt, Simon Pieters, Glenn Adams, John Mellor, blink-dev
lgtm

Jochen Eisinger

unread,
Jan 25, 2014, 4:09:32 PM1/25/14
to Eric Seidel, Tab Atkins Jr., Ojan Vafai, Kenneth Rohde Christiansen, Philip Jägenstedt, Simon Pieters, Glenn Adams, John Mellor, blink-dev
lgtm3
Reply all
Reply to author
Forward
0 new messages