<?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>17168</bug_id>
          
          <creation_ts>2012-05-24 12:22:24 +0000</creation_ts>
          <short_desc>Track selection cannot be performed (synchronously) per inserted track</short_desc>
          <delta_ts>2012-09-22 08:22:06 +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>VERIFIED</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>philipj</cc>
    
    <cc>silviapfeiffer1</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68073</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-05-24 12:22:24 +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:
Track selection cannot be performed (synchronously) per inserted track

Posted from: 2001:4c28:a032:32:99ec:df32:e805:6235 by philipj@opera.com
User agent: Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.10.289 Version/12.00</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68074</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2012-05-24 13:06:57 +0000</bug_when>
    <thetext>The spec text begins with &quot;When a text track corresponding to a track element is added to a media element&apos;s list of text tracks, the user agent must set the text track mode appropriately, as determined by the following conditions:&quot;

It appears that this requires the steps that follow to be run synchronously when a track element is inserted, which is not what we want to implement. Doing so could mean that if a user has indicated a preference for English, French and Swedish (in that order) and tracks in Swedish, French and English are added by script (in that order), the Swedish and French tracks will first be enabled, and then set to hidden when the next track is added.

We want to implement a heuristic that look at the set of available tracks all at once and picks enables those that that are relevant. This heuristic should be run synchronously when the parser encounters &lt;/video&gt; (including in innerHTML) and after awaiting a stable state if a script inserts a &lt;track&gt; element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68076</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2012-05-24 13:12:13 +0000</bug_when>
    <thetext>As a more theoretical concern, since the spec as written asks things like &quot;If there is a text track in the media element&apos;s list of text tracks whose text track mode is showing by default&quot; a naive implementation of that while inserting tracks would lead to O(n^2) track insertion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70847</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 17:37:07 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18190 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73457</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-07 23:33:01 +0000</bug_when>
    <thetext>Tough one. Thinking about it, we really want to consider the available text tracks after the in-band tracks have been considered also, which really means after the user has hit play, which seems bad, because you really want the user to be able to manipulate this UI long before they hit play...

Do we just punt on in-band tracks when there are also out-of-band ones?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73633</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-11 21:56:49 +0000</bug_when>
    <thetext>I punted on in-band tracks for now. Not sure what to do with those. There&apos;s some hand-wavy text there in the meantime that might work.

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>73696</commentid>
    <comment_count>6</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2012-09-12 14:14:51 +0000</bug_when>
    <thetext>This aspect of the updated spec looks good to me, but I haven&apos;t reviewed all of changes so I might come back with more issues later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74302</commentid>
    <comment_count>7</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-09-22 08:22:06 +0000</bug_when>
    <thetext>Just FYI: fixed in 
http://html5.org/tools/web-apps-tracker?from=7325&amp;to=7326</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>