<?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>22015</bug_id>
          
          <creation_ts>2013-05-13 07:12:09 +0000</creation_ts>
          <short_desc>TextTrack should have an id attribute</short_desc>
          <delta_ts>2013-06-09 11:17:57 +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>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          <dependson>18971</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Silvia Pfeiffer">silviapfeiffer1</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>acolwell</cc>
    
    <cc>acolwell</cc>
    
    <cc>cyril.concolato</cc>
    
    <cc>eoconnor</cc>
    
    <cc>glenn</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87585</commentid>
    <comment_count>0</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-05-13 07:12:09 +0000</bug_when>
    <thetext>+++ This bug was initially created as a clone of Bug #18971 +++

TextTrack does not contain an id attribute like AudioTrack &amp; VideoTrack so they can&apos;t be reference by Media Fragment URIs like audio &amp; video can. 

I propose that the id attribute be added to TextTrack and a getTrackById() method be added to TextTrackList so that these objects are consistent with the audio and video counterparts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87607</commentid>
    <comment_count>1</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2013-05-13 15:11:25 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; +++ This bug was initially created as a clone of Bug #18971 +++
&gt; 
&gt; TextTrack does not contain an id attribute like AudioTrack &amp; VideoTrack so
&gt; they can&apos;t be reference by Media Fragment URIs like audio &amp; video can. 
&gt; 
&gt; I propose that the id attribute be added to TextTrack and a getTrackById()
&gt; method be added to TextTrackList so that these objects are consistent with
&gt; the audio and video counterparts.

+1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87609</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-05-13 15:30:50 +0000</bug_when>
    <thetext>What&apos;s the use case? :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87610</commentid>
    <comment_count>3</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2013-05-13 16:02:46 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; What&apos;s the use case? :-)

The same use cases that justify the existance of AudioTrack.id &amp; VideoTrack.id. :) This is primarily a call for consistency across all XXXTrack types. Inband text tracks would likely have IDs similar to the audio and video tracks and applications may want to select these tracks by ID though Media Fragment URIs or JS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87611</commentid>
    <comment_count>4</comment_count>
    <who name="Cyril Concolato">cyril.concolato</who>
    <bug_when>2013-05-13 16:07:00 +0000</bug_when>
    <thetext>I think this was discussed during TPAC in Lyon last year and was agreed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87631</commentid>
    <comment_count>5</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-05-14 06:41:04 +0000</bug_when>
    <thetext>
&lt;track&gt; (HTMLTrackElement) has an id as part of the global attributes. TextTrack could reuse that for tracks being created through &lt;track&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87632</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-05-14 06:50:12 +0000</bug_when>
    <thetext>So a readonly attribute?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87633</commentid>
    <comment_count>7</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-05-14 07:10:49 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; So a readonly attribute?

Yes, I think that makes sense. Should probably be added to addTextTrack then, so it can be set for JS-created tracks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88956</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-06-08 00:04:40 +0000</bug_when>
    <thetext>Adding a TextTrack.id wouldn&apos;t let you select them via media fragment URLs. It would let you track down which text track you want from JS, though, for in-band tracks. So I&apos;ve added it.

I don&apos;t see the use case for an argument to addTextTrack().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88957</commentid>
    <comment_count>9</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-06-08 00:05:22 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7947.
Check-in comment: Add TextTrack.id and TextTrackList.getTrackById to enable in-band text tracks to be identified and selected from JS
http://html5.org/tools/web-apps-tracker?from=7946&amp;to=7947</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88980</commentid>
    <comment_count>10</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-06-09 11:17:57 +0000</bug_when>
    <thetext>This is just a FYI: the original WD of the media fragment URI spec had the track references included, see http://www.w3.org/TR/2011/CR-media-frags-20111201/#naming-track . I believe they were removed when going onto the REC track, because REC can only include features that have been implemented interoperably. So, if implemented, it would indeed be possible to reference tracks by their track id.


The use case for adding an id parameter to addTextTrack is to allow JS developers to author track identifiers. Since the id attribute is read-only, we&apos;re now excluding JS developers from authoring tracks with an explicit identifier and referencing their tracks by id. I&apos;m not overly worried by this restriction, since JS devs can always hold onto a reference to their newly created text tracks. It&apos;s just a small inconsistency.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>