<?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>15606</bug_id>
          
          <creation_ts>2012-01-18 15:47:33 +0000</creation_ts>
          <short_desc>&lt;track&gt; clarification of TextTrackCue.getCueAsHTML() conversion rules</short_desc>
          <delta_ts>2012-04-25 19:08:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Glenn Adams">glenn</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>silviapfeiffer1</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62855</commentid>
    <comment_count>0</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-01-18 15:47:33 +0000</bug_when>
    <thetext>In Section 4.8.10.12.5 Text track API, appears the following language:

&quot;The getCueAsHTML() method must convert the text track cue text to a DocumentFragment for the media element&apos;s Document, using the appropriate rules for doing so. For example, for WebVTT, those rules are the WebVTT cue text parsing rules and the WebVTT cue text DOM construction rules. [WEBVTT]&quot;

It would be useful to add clarifying information to the end of this paragraph (or in a new paragraph) as follows:

&quot;Conversion rules for text track cue text other than WebVTT is expected to be defined by other specifications. If an HTML user agent does not recognize the text track cue format or does not support conversion rules specified for that format, then getCueAsHTML() should return a DocumentFragment containing a single Text node whose data attribute is identical to the text track cue text.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62860</commentid>
    <comment_count>1</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-01-18 16:55:33 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; In Section 4.8.10.12.5 Text track API, appears the following language:
&gt; 
&gt; &quot;The getCueAsHTML() method must convert the text track cue text to a
&gt; DocumentFragment for the media element&apos;s Document, using the appropriate rules
&gt; for doing so. For example, for WebVTT, those rules are the WebVTT cue text
&gt; parsing rules and the WebVTT cue text DOM construction rules. [WEBVTT]&quot;
&gt; 
&gt; It would be useful to add clarifying information to the end of this paragraph
&gt; (or in a new paragraph) as follows:
&gt; 
&gt; &quot;Conversion rules for text track cue text other than WebVTT is expected to be
&gt; defined by other specifications. If an HTML user agent does not recognize the
&gt; text track cue format or does not support conversion rules specified for that
&gt; format, then getCueAsHTML() should return a DocumentFragment containing a
&gt; single Text node whose data attribute is identical to the text track cue text.&quot;

Alternatively in this new text, and perhaps better, would be:

&quot;... should return null.&quot;

which would be a clear indication to script that the UA does not know or support
conversion to HTML.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63867</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-02-08 00:20:14 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: no spec change
Rationale: This is already described in this section:

http://www.whatwg.org/specs/web-apps/current-work/#guidelines-for-exposing-cues-in-various-formats-as-text-track-cues</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63870</commentid>
    <comment_count>3</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-02-08 00:28:13 +0000</bug_when>
    <thetext>i&apos;d like normative text regarding what should be returned by getCueAsHTML() in the case that the UA does not know the format or does not support conversion of a known format; i would suggest that null be returned in such cases</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63889</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2012-02-08 13:01:11 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; i&apos;d like normative text regarding what should be returned by getCueAsHTML() in
&gt; the case that the UA does not know the format or does not support conversion of
&gt; a known format; i would suggest that null be returned in such cases

If the UA doesn&apos;t know the format at all, why would it expose the track in the first place? It seems that anything that has a text representation can be serialized, and anything else shouldn&apos;t be a TextTrackCue at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63900</commentid>
    <comment_count>5</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-02-08 14:47:41 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; i&apos;d like normative text regarding what should be returned by getCueAsHTML() in
&gt; &gt; the case that the UA does not know the format or does not support conversion of
&gt; &gt; a known format; i would suggest that null be returned in such cases
&gt; 
&gt; If the UA doesn&apos;t know the format at all, why would it expose the track in the
&gt; first place? It seems that anything that has a text representation can be
&gt; serialized, and anything else shouldn&apos;t be a TextTrackCue at all.

that&apos;s a good point (about not exposing a possible text track if the format is not known or supported); perhaps there should be normative language to that effect?

regarding exposing raw non-text formats, at least one mapping from binary metadata content to a (base64) text representation in a text track cue has been defined at:

http://www.cablelabs.com/specifications/CL-SP-HTML5-MAP-I01-120120.pdf

so it would not do to prohibit exposing binary track data via text track cues; note that a mapping from CEA-608 or CEA-708 closed caption data (also binary) into text track cues is likely to be defined at some point;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63910</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-02-08 23:19:49 +0000</bug_when>
    <thetext>&gt; that&apos;s a good point (about not exposing a possible text track if the format is
&gt; not known or supported); perhaps there should be normative language to that
&gt; effect?

There is. That&apos;s what&apos;s I cited for you earlier.

You can&apos;t get to the situation you are describing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63913</commentid>
    <comment_count>7</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-02-08 23:46:37 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; &gt; that&apos;s a good point (about not exposing a possible text track if the format is
&gt; &gt; not known or supported); perhaps there should be normative language to that
&gt; &gt; effect?
&gt; 
&gt; There is. That&apos;s what&apos;s I cited for you earlier.
&gt; 
&gt; You can&apos;t get to the situation you are describing.

ok, based on one reading of 4.8.10.12.2 (in-band):

&quot;When a media resource contains data that the user agent recognises and supports as being equivalent to a text track, the user agent runs the steps to expose a media-resource-specific text track with the relevant data, as follows.&quot;

and of 4.8.10.12.3 (out-of-band):

&quot;If the fetching algorithm fails for any reason ... or if the sniffed type of the resource is not a supported text track format, then queue a task to first change the text track readiness state to failed to load...&quot;

i can agree that no spec change is necessary; however, it would be a little more clear if 4.8.10.12.2 had an &quot;otherwise... do not expose ... a media-resource-specific text track&quot; as the the alternate to &quot;when ...&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67038</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-04-25 18:51:10 +0000</bug_when>
    <thetext>That would be like saying &quot;if you are able to float off into the air, then do so. Otherwise, make sure you do not float off into the air&quot;. How is a UA supposed to expose something that it doesn&apos;t know how to expose? By definition if it exposes it then it knows how to expose it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67046</commentid>
    <comment_count>9</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-04-25 19:08:13 +0000</bug_when>
    <thetext>withdrawn</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>