<?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>17271</bug_id>
          
          <creation_ts>2012-05-31 12:52:32 +0000</creation_ts>
          <short_desc>&lt;track&gt; should not load without a media element parent</short_desc>
          <delta_ts>2012-09-12 14:44: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>other</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#sourcing-out-of-band-text-tracks</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>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>odinho</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68416</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-05-31 12:52:32 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#sourcing-out-of-band-text-tracks
Complete: http://www.whatwg.org/c#sourcing-out-of-band-text-tracks

Comment:
&lt;track&gt; Move crossorigin=&quot;&quot; to &lt;track&gt;

Posted from: 2001:4c28:a030:30:10c4:66a0:3c62:e586 by simonp@opera.com
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; en) Presto/2.10.229 Version/11.64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68417</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-05-31 12:56:31 +0000</bug_when>
    <thetext>[[
If URL is not the empty string, perform a potentially CORS-enabled fetch of URL, with the mode being the state of the media element&apos;s crossorigin content attribute, the origin being the origin of the media element&apos;s Document, and the default origin behaviour set to fail.
]]

I think this is problematic for several reasons:

* There might not be a media element.
* You might want to allow cross-origin fetching of the video but not of the tracks, or vice versa.

I think it would be better to have a crossorigin attribute on &lt;track&gt; and let the track load algorithm look only at that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68518</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-06-01 16:12:22 +0000</bug_when>
    <thetext>We discussed this for a bit internally and concluded that the added flexibility with &lt;track crossorigin&gt; was not worth the added verbosity. To solve this:

&gt; * There might not be a media element.

We suggest instead that &lt;track&gt; never loads if it doesn&apos;t have a media element as parent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70899</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 17:42:55 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18216 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73573</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-10 22:32:49 +0000</bug_when>
    <thetext>So the idea is just to disable &lt;track&gt; _until_ it has a media element parent, but once it has one, to switch on the &lt;track&gt; element and leave it &quot;on&quot; even if the element is moved out again?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73584</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-09-11 07:35:55 +0000</bug_when>
    <thetext>Yeah, there isn&apos;t much reason to kill a &lt;track&gt; if it gets moved out of its media parent. Just when the load starts, if it doesn&apos;t have a media element parent, stop the load algorithm. When a track element gets a new media element parent, it probably makes sense to rerun the load algorithm (like when src changes).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73629</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-11 21:51:42 +0000</bug_when>
    <thetext>I made this change as part of wider track changes. Let me know if the spec looks good now or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73697</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-09-12 14:44:43 +0000</bug_when>
    <thetext>It looks good.

First I thought it would be better to read the crossorigin attribute before awaiting a stable state so that we don&apos;t need to check the parent again, but I realize that we probably want scripts to be able to set things in arbitrary order and have the same outcome, which means we have to await a stable state (&lt;img&gt; also does that).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>