<?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>26924</bug_id>
          
          <creation_ts>2014-09-29 09:12:23 +0000</creation_ts>
          <short_desc>[MSE] Default Track Language</short_desc>
          <delta_ts>2014-10-06 16:32:48 +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>Media Source Extensions</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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>CR</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Cyril Concolato">cyril.concolato</reporter>
          <assigned_to name="Aaron Colwell">acolwell</assigned_to>
          <cc>acolwell</cc>
    
    <cc>b.lund</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</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>112365</commentid>
    <comment_count>0</comment_count>
    <who name="Cyril Concolato">cyril.concolato</who>
    <bug_when>2014-09-29 09:12:23 +0000</bug_when>
    <thetext>The spec says:
&quot;If audio language equals an empty string then run the default track language algorithm with byteStreamTrackID set to audio byte stream track ID and type set to &quot;audio&quot; and assign the value returned by the algorithm to audio language.&quot;

The default track language information is used only if the language in the initialization segment is the empty string however BCP-47 allows the value &apos;und&apos;:

&quot;The &apos;und&apos; (Undetermined) primary language subtag identifies linguistic content whose language is not determined.&quot;

Change the text above to:
&quot;If audio language equals an empty string or the &apos;und&apos; BCP-47 value, then run the default track language algorithm with byteStreamTrackID set to audio byte stream track ID and type set to &quot;audio&quot; and assign the value returned by the algorithm to audio language.&quot;

The same is applicable for video or text tracks.

PS: Don&apos;t know what to do with other weird BCP-47 tags: &apos;mul&apos;, &apos;mis&apos;, &apos;zxx&apos; ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112387</commentid>
    <comment_count>1</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2014-09-29 15:48:17 +0000</bug_when>
    <thetext>The default information was only intended to be used if no information is found in the init segment. If the init segment contains &quot;und&quot; then I don&apos;t believe the default track language algorithm should trigger since the intent is to just reflecting what is in the init segment if something is present. In your case, &quot;und&quot; is present.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112389</commentid>
    <comment_count>2</comment_count>
    <who name="Cyril Concolato">cyril.concolato</who>
    <bug_when>2014-09-29 16:09:43 +0000</bug_when>
    <thetext>(In reply to Aaron Colwell from comment #1)
&gt; In your case, &quot;und&quot; is present.
The problem is that &quot;und&quot; is present as a default in many MP4 files, because people forgot or did not know how to tag their files with a proper language. If I make an application that uses this kind of content and I know it&apos;s in French but don&apos;t have the means to change the file because it&apos;s hosted somewhere else, I&apos;ll be stuck.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112390</commentid>
    <comment_count>3</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2014-09-29 16:32:49 +0000</bug_when>
    <thetext>(In reply to Cyril Concolato from comment #2)
&gt; (In reply to Aaron Colwell from comment #1)
&gt; &gt; In your case, &quot;und&quot; is present.
&gt; The problem is that &quot;und&quot; is present as a default in many MP4 files, because
&gt; people forgot or did not know how to tag their files with a proper language.
&gt; If I make an application that uses this kind of content and I know it&apos;s in
&gt; French but don&apos;t have the means to change the file because it&apos;s hosted
&gt; somewhere else, I&apos;ll be stuck.

My concern is that we have a slippery slope here. We are going from just filling in info that isn&apos;t there to overriding info in the init segment. I can understand the desire to &quot;correct&quot; the language information in this case because you don&apos;t own the source files, but what if the files actually have completely bogus information in them. You wouldn&apos;t be able to correct for that with your proposed solution. 

It seems like we should either reflect what is in the init segment and only fallback to the defaults if nothing is present (like we do now) or allow a default to always override what is in the init segment. Special casing &apos;und&apos; just doesn&apos;t feel right to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112439</commentid>
    <comment_count>4</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-09-30 03:53:24 +0000</bug_when>
    <thetext>(In reply to Cyril Concolato from comment #2)
&gt; (In reply to Aaron Colwell from comment #1)
&gt; &gt; In your case, &quot;und&quot; is present.
&gt; The problem is that &quot;und&quot; is present as a default in many MP4 files, because
&gt; people forgot or did not know how to tag their files with a proper language.
&gt; If I make an application that uses this kind of content and I know it&apos;s in
&gt; French but don&apos;t have the means to change the file because it&apos;s hosted
&gt; somewhere else, I&apos;ll be stuck.

Can&apos;t you just overwrite it in JavaScript?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112472</commentid>
    <comment_count>5</comment_count>
    <who name="Bob Lund">b.lund</who>
    <bug_when>2014-09-30 16:03:34 +0000</bug_when>
    <thetext>(In reply to Silvia Pfeiffer from comment #4)
&gt; (In reply to Cyril Concolato from comment #2)
&gt; &gt; (In reply to Aaron Colwell from comment #1)
&gt; &gt; &gt; In your case, &quot;und&quot; is present.
&gt; &gt; The problem is that &quot;und&quot; is present as a default in many MP4 files, because
&gt; &gt; people forgot or did not know how to tag their files with a proper language.
&gt; &gt; If I make an application that uses this kind of content and I know it&apos;s in
&gt; &gt; French but don&apos;t have the means to change the file because it&apos;s hosted
&gt; &gt; somewhere else, I&apos;ll be stuck.
&gt; 
&gt; Can&apos;t you just overwrite it in JavaScript?

@kind, @language and @label are readonly. JS overwriting these attributes after the UA sets them indicates that the MPD and initialization segment data conflict, which is a problem, except in the &apos;und&apos; case.

It seems better to make a special case that &apos;und&apos; is the same as not set. Then the TrackDefault.language can provide the value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112752</commentid>
    <comment_count>6</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2014-10-06 16:32:48 +0000</bug_when>
    <thetext>Change committed.
https://dvcs.w3.org/hg/html-media/rev/f6f98eddb48d

The &apos;und&apos; value now runs the default language algorithm for audio, video, and text tracks as requested.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>