This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28921 - Treat preload="none" as preload="metadata" when load() is called
Summary: Treat preload="none" as preload="metadata" when load() is called
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other All
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-07 07:26 UTC by Brian Birtles
Modified: 2019-03-29 22:17 UTC (History)
5 users (show)

See Also:


Attachments

Description Brian Birtles 2015-07-07 07:26:25 UTC
See problem described here:

  https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Jun/0055.html

In summary, some sites are calling load() on preload="none" resources and expecting to get a "loadedmetadata" event even though the spec doesn't require this.

Philip Jägenstedt notes:

  The most straightforward way to specify this is probably if load()
  sets an internal flag on the media element, and if the the resource
  fetch algorithm simply skips the preload="none" steps if it is set.
  Another path could be to make more explicit that there's an internal
  preload state that is influenced not only by the content attribute,
  but also by setting the autoplay attribute, calling play(), setting
  currentTime, and now, calling load().[1]

[1] https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Jul/0008.html
Comment 1 Philip Jägenstedt 2015-07-07 08:29:29 UTC
Simon, are you editing the embedded content part of the spec now, or is this still on Hixie's table?
Comment 2 Philip Jägenstedt 2015-07-07 08:30:45 UTC
Brian, can you describe in some detail how this was implemented in Gecko? For example, does calling load() change the preload content or IDL attributes? Is the logic connected to the similar overrides of preload for autoplay, calling play() or setting currentTime?
Comment 3 Brian Birtles 2015-07-08 07:51:57 UTC
(In reply to Philip Jägenstedt from comment #2)
> Brian, can you describe in some detail how this was implemented in Gecko?
> For example, does calling load() change the preload content or IDL
> attributes? Is the logic connected to the similar overrides of preload for
> autoplay, calling play() or setting currentTime?

The relevant bug is: https://bugzilla.mozilla.org/show_bug.cgi?id=1165203

We basically set a flag when load() is called saying "explicitly called load()". Then, when we go to work out the effective preload value to use (since there are complex rules determining the default preload value when it is not set), if the result is "none" and the flag is set, we let the effective preload value be "metadata".

We do actually store that resulting "metadata" but I don't think that's observable.

We don't do anything different for calls to play(), currentTime etc.
Comment 4 Simon Pieters 2015-08-24 19:58:55 UTC
(In reply to Philip Jägenstedt from comment #1)
> Simon, are you editing the embedded content part of the spec now,

No, only <img>.
Comment 5 Domenic Denicola 2019-03-29 22:17:43 UTC
https://github.com/whatwg/html/issues/4492