Remove media="" from <source> if it isn't used (0.00003%)

50 views
Skip to first unread message

Philip Jägenstedt

unread,
Jan 22, 2014, 10:16:47 PM1/22/14
to blink-dev, Ian Hickson
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19619

The media attribute on the <source> element is involved in the
resource selection algorithm for <audio> and <video> elements. If the
CSS media query does not match, the source is skipped. Why the feature
exists isn't exactly clear to me,[1] and it since the attribute is
only evaluated once, it's not adaptive in the modern sense.

I added use counters SourceElementCandidate and
SourceElementNonMatchingMedia [2] to inform the spec discussion and
this is what I found:[3]

> The use counter has been in for long enough to collect some good data. These
> are the numbers we got:
>
> SourceElementCandidate 0.21%
> SourceElementNonMatchingMedia 0.00003%
>
> What this means is that 0.21% of pages considered a source element candidate
> (the "Process candidate" step in the resource selection algorithm) but only
> 0.00003% of pages had a source element that failed to be selected due to the
> media attribute.
>
> The usage is much lower than other features that have been removed from
> Blink. My personal preference is to remove it from spec and implementation
> immediately, but I cannot make promises on behalf of the Blink community.
>
> Hixie, what's the next step here?

Hixie has said [4] that "I think the right next step here would be for
a browser vendor to drop support. If no vendor is willing to do that,
it's probably not worth removing it from the spec."

Now would be the time to either remove the feature or forever keep it.
Given the extremely low non-matching usage and willingness of the
editor to remove it from the spec, I think we should drop it without
deprecation period.

Thoughts on removing this still-in-spec and widely implemented
feature? (This isn't an Intent to Remove, I wanted to pre-flight it
because it's a somewhat unusual case.)

Philip

[1] http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/035958.html
[2] https://codereview.chromium.org/32583007
[3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=19619#c30
[4] https://www.w3.org/Bugs/Public/show_bug.cgi?id=19619#c20

Eric Seidel

unread,
Jan 22, 2014, 11:38:50 PM1/22/14
to Philip Jägenstedt, blink-dev, Ian Hickson
That seems well under our previously successful removal numbers. SGTM.

Ojan Vafai

unread,
Jan 23, 2014, 1:27:22 PM1/23/14
to Eric Seidel, Philip Jägenstedt, blink-dev, Ian Hickson
LGTM as well
Reply all
Reply to author
Forward
0 new messages