<?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>20853</bug_id>
          
          <creation_ts>2013-02-02 07:08:40 +0000</creation_ts>
          <short_desc>WebVTT: WebVTT files should have a default language</short_desc>
          <delta_ts>2014-01-28 06:44:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>TextTracks CG</product>
          <component>WebVTT</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>v2</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>15922</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Silvia Pfeiffer">silviapfeiffer1</reporter>
          <assigned_to name="Silvia Pfeiffer">silviapfeiffer1</assigned_to>
          <cc>dgorbik</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-texttracks</cc>
    
    <cc>rick.eyre</cc>
    
    <cc>singer</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82497</commentid>
    <comment_count>0</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-02-02 07:08:40 +0000</bug_when>
    <thetext>As discussed in bug 15922 , the :lang() selector used on a WebVTT file&apos;s cues that have no &lt;lang&gt; markup can&apos;t match anything.

This leads back to the need to specify file-level language.

One way to fix this is to take the implicit assumption that if the WebVTT file was pulled in via a &lt;track ... @srclang attribute, that @srclang is the default language of the WebVTT file and can be used in :lang() selections, e.g. when all text on a video in a particular language requires specific styling. Providing &lt;lang&gt; markers for every single cue just to set the default language seems overkill.

This further leads on to specifying the language of the WebVTT file in the file itself for those applications that don&apos;t display the WebVTT file in a browser e.g. as in

   WEBVTT
   Language=fr

   cue id
   00:00:00.000 --&gt; 00:00:01.000
   bonjour

IMO this file-wide metadata field can be ignored by the Web browser, since the Web browser relies on @srclang in &lt;track&gt;. So, this is just a hint for other WebVTT consuming clients.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82498</commentid>
    <comment_count>1</comment_count>
    <who name="Dima Gorbik">dgorbik</who>
    <bug_when>2013-02-02 07:35:43 +0000</bug_when>
    <thetext>(In reply to comment #0)
This is cool, we could just have this &quot;file-level&quot; language pushed onto the language stack so that it&apos;s never empty. Should be really easy in terms of implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84657</commentid>
    <comment_count>2</comment_count>
    <who name="David Singer">singer</who>
    <bug_when>2013-03-19 21:35:38 +0000</bug_when>
    <thetext>Rather than saying that file-level attributes can be ignored by a browser, I think it cleaner to say that the HTML level takes precedence if something is in both places and can be specified only once.  This leaves open then the possibility of both inheriting style sheets from the browser context, and also having one (e.g. to do x08-like effects) specified for the VTT only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99258</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-01-28 05:36:58 +0000</bug_when>
    <thetext>Making the :lang() selector do something does not require language metadata in the file itself, hooking it up with TextTrack.language would suffice.

However, this bug does not explain *why* there needs to be a default language that :lang() can match. That would just match everything that isn&apos;t in &lt;lang&gt;, which can just as well be done with the ::cue() pseudo-element, having :lang() override that default style where needed.

If reopened, I think this should still be v2, and that we should wait for Web authors in the trenches to request this before adding it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>