<?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>17157</bug_id>
          
          <creation_ts>2012-05-23 12:20:15 +0000</creation_ts>
          <short_desc>&lt;track&gt; Need to await a stable state before assigning /URL/ in the first run</short_desc>
          <delta_ts>2012-09-07 21:51:01 +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>RESOLVED</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>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68046</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-05-23 12:20:15 +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; Need to await a stable state before assigning /URL/ in the first run

Posted from: 85.227.154.145 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>68047</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-05-23 12:26:18 +0000</bug_when>
    <thetext>Consider

var track = document.createElement(&apos;track&apos;);
track.src = &apos;foo&apos;;

When the track is created, the loading algorithm starts, which immediately stores the track URL (which is the empty string) and runs the /download/ step async. That step says to fire an &apos;error&apos; event if track URL is empty and then move on to the /monitoring/ step. Since it&apos;s async, it&apos;s racy as to whether the script will have set .src yet or not.

This is clearly bogus. We should await a stable state before storing /URL/ and starting the download.

Editorial comment: Since the same behavior should happen after the /monitoring/ step, these steps could be at the top of the /download/ so you don&apos;t need to have the exact same steps repeated in two places in the algorithm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68063</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-05-23 17:38:48 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Consider
&gt; 
&gt; var track = document.createElement(&apos;track&apos;);
&gt; track.src = &apos;foo&apos;;

Make that:

var track = document.createElement(&apos;track&apos;);
track.mode = &apos;showing&apos;;
track.src = &apos;foo&apos;;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68553</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-06-04 05:21:34 +0000</bug_when>
    <thetext>*** Bug 17156 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70891</commentid>
    <comment_count>4</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 17:42:03 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18212 as part of operation convergence.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>