W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2015

[whatwg] preload="none" and HTMLMediaElement.load()

From: Brian Birtles <bbirtles@mozilla.com>
Date: Wed, 17 Jun 2015 09:55:23 +0900
Message-ID: <5580C57B.3030509@mozilla.com>
To: whatwg <whatwg@lists.whatwg.org>
The HTMLMediaElement.load()[1] method currently cancels playback of the 
current resource and runs the resource selection algorithm[2] (and in 
turn the resource fetch algorithm[3]). When preload="none", however, the 
resource fetch algorithm doesn't require the UA to load data or progress 
to HAVE_METADATA--instead it can suspend the load until, for example, 
the user goes to play the video.

In Firefox we've hit compatibility issues where some sites are calling 
load() on preload="none" resources and expecting to get a 
"loadedmetadata" event.[4]

Apparently, even with preload="none", Chrome and IE progress to 
HAVE_METADATA when load() is called. Presto, apparently, does not.

I've just landed a patch in Firefox to make a call to load() treat 
preload="none" as preload="metadata" to match the behavior of Chrome/IE 
in this case.

(Note that we need to do this not only when preload="none" is explicitly 
specified but also when the preload attribute is missing and the UA's 
missing value default for preload is 'none'--as is the case for us on 
mobile.)

Is it possible to get this reflected in the spec?

Best regards,

Brian

[1] 
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-load
[2] 
https://html.spec.whatwg.org/multipage/embedded-content.html#concept-media-load-algorithm
[3] 
https://html.spec.whatwg.org/multipage/embedded-content.html#concept-media-load-resource
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=1165203
Received on Wednesday, 17 June 2015 00:55:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:33 UTC