<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>28921</bug_id>
          
          <creation_ts>2015-07-07 07:26:25 +0000</creation_ts>
          <short_desc>Treat preload=&quot;none&quot; as preload=&quot;metadata&quot; when load() is called</short_desc>
          <delta_ts>2019-03-29 22:17:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brian Birtles">bbirtles</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>chrisharrell444</cc>
    
    <cc>d</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>121847</commentid>
    <comment_count>0</comment_count>
    <who name="Brian Birtles">bbirtles</who>
    <bug_when>2015-07-07 07:26:25 +0000</bug_when>
    <thetext>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=&quot;none&quot; resources and expecting to get a &quot;loadedmetadata&quot; event even though the spec doesn&apos;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=&quot;none&quot; steps if it is set.
  Another path could be to make more explicit that there&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121849</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-07-07 08:29:29 +0000</bug_when>
    <thetext>Simon, are you editing the embedded content part of the spec now, or is this still on Hixie&apos;s table?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121850</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-07-07 08:30:45 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121865</commentid>
    <comment_count>3</comment_count>
    <who name="Brian Birtles">bbirtles</who>
    <bug_when>2015-07-08 07:51:57 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #2)
&gt; Brian, can you describe in some detail how this was implemented in Gecko?
&gt; For example, does calling load() change the preload content or IDL
&gt; attributes? Is the logic connected to the similar overrides of preload for
&gt; 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 &quot;explicitly called load()&quot;. 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 &quot;none&quot; and the flag is set, we let the effective preload value be &quot;metadata&quot;.

We do actually store that resulting &quot;metadata&quot; but I don&apos;t think that&apos;s observable.

We don&apos;t do anything different for calls to play(), currentTime etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122755</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2015-08-24 19:58:55 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #1)
&gt; Simon, are you editing the embedded content part of the spec now,

No, only &lt;img&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129710</commentid>
    <comment_count>5</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2019-03-29 22:17:43 +0000</bug_when>
    <thetext>https://github.com/whatwg/html/issues/4492</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>