Skip to content

Commit

Permalink
[giow] (1) Try to make the text track pending thing work better.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=14260
Affected topics: Video Text Tracks, Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@7148 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 26, 2012
1 parent 00e373c commit 6c7f934
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 28 deletions.
59 changes: 50 additions & 9 deletions complete.html
Expand Up @@ -28888,6 +28888,14 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
ended. (Steps in <a href=#synchronous-section title="synchronous section">synchronous
sections</a> are marked with &#8987;.)</li>

<li>

<p>&#8987; If the <a href=#media-element>media element</a>'s
<a href=#blocked-on-parser>blocked-on-parser</a> flag is false, then <a href=#populate-the-list-of-pending-text-tracks>populate
the list of pending text tracks</a>.</p>

</li>

<li>

<p>&#8987; If the <a href=#media-element>media element</a> has a <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute, then let <var title="">mode</var> be <i title="">attribute</i>.</p>
Expand Down Expand Up @@ -29135,6 +29143,11 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
algorithm. This is now the element's <a href=#media-resource>media
resource</a>.</li>

<li><p>Remove all <a href=#media-resource-specific-text-track title="media-resource-specific text
track">media-resource-specific text tracks</a> from the
<a href=#media-element>media element</a>'s <a href=#list-of-pending-text-tracks>list of pending text
tracks</a>, if any.</p>

<li><p>Optionally, run the following substeps. This is the expected
behavior if the user agent intends to not attempt to fetch the
resource until the use requests it explicitly (e.g. as a way to
Expand Down Expand Up @@ -32834,15 +32847,43 @@ <h6 id=text-track-model><span class=secno>4.8.10.12.1 </span>Text track model</h
</dl><p>Each <a href=#text-track>text track</a> has a corresponding
<code><a href=#texttrack>TextTrack</a></code> object.</p>

<p>The <a href=#text-track title="text track">text tracks</a> of a
<a href=#media-element>media element</a> are <dfn id=the-text-tracks-are-ready title="the text tracks are
ready">ready</dfn> if all the <a href=#text-track title="text track">text
tracks</a> whose <a href=#text-track-mode title="text track mode">mode</a> was
not in the <a href=#text-track-disabled title="text track disabled">disabled</a> state
when the element's <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a> last started now have a <a href=#text-track-readiness-state>text track readiness
state</a> of <a href=#text-track-loaded title="text track loaded">loaded</a> or
<a href=#text-track-failed-to-load title="text track failed to load">failed to load</a>.</p>
<hr><p>Each <a href=#media-element>media element</a> has a <dfn id=list-of-pending-text-tracks>list of pending text
tracks</dfn>, which must initially be empty, and a
<dfn id=blocked-on-parser>blocked-on-parser</dfn> flag, which must initially be false.
When the user agent is required to <dfn id=populate-the-list-of-pending-text-tracks>populate the list of pending
text tracks</dfn> of a <a href=#media-element>media element</a>, the user agent
must add to the element's <a href=#list-of-pending-text-tracks>list of pending text tracks</a>
each <a href=#text-track>text track</a> in the element's <a href=#list-of-text-tracks>list of text
tracks</a> whose <a href=#text-track-mode>text track mode</a> is not <a href=#text-track-disabled title="text track disabled">disabled</a> and whose <a href=#text-track-readiness-state>text
track readiness state</a> is <!--either <span title="text track
not loaded">not loaded</span> or [there can't be any in the 'not
loaded' state that are not 'disabled']--> <a href=#text-track-loading title="text track
loading">loading</a>.</p>

<p>Whenever a <code><a href=#the-track-element>track</a></code> element's parent node changes, the
user agent must remove the corresponding <a href=#text-track>text track</a>
from any <a href=#list-of-pending-text-tracks>list of pending text tracks</a> that it is in.</p>

<p>Whenever a <a href=#text-track>text track</a>'s <a href=#text-track-readiness-state>text track readiness
state</a> changes to either <a href=#text-track-loaded title="text track
loaded">loaded</a> or <a href=#text-track-failed-to-load title="text track failed to
load">failed to load</a>, the user agent must remove it from any
<a href=#list-of-pending-text-tracks>list of pending text tracks</a> that it is in.</p>

<p>When a <a href=#media-element>media element</a> is created by an <a href=#html-parser>HTML
parser</a> or <a href=#xml-parser>XML parser</a>, the user agent must set
the element's <a href=#blocked-on-parser>blocked-on-parser</a> flag to true. When a
<a href=#media-element>media element</a> is popped off the <a href=#stack-of-open-elements>stack of open
elements</a> of an <a href=#html-parser>HTML parser</a> or <a href=#xml-parser>XML
parser</a>, the user agent must <a href=#populate-the-list-of-pending-text-tracks>populate the list of
pending text tracks</a> and set the element's
<a href=#blocked-on-parser>blocked-on-parser</a> flag to false.</p>

<p>The <a href=#text-track title="text track">text tracks</a> of a <a href=#media-element>media
element</a> are <dfn id=the-text-tracks-are-ready title="the text tracks are
ready">ready</dfn> when both the element's <a href=#list-of-pending-text-tracks>list of pending
text tracks</a> is empty and the element's
<a href=#blocked-on-parser>blocked-on-parser</a> flag is false.</p>

<hr><p>A <dfn id=text-track-cue>text track cue</dfn> is the unit of time-sensitive data
in a <a href=#text-track>text track</a>, corresponding for instance for
Expand Down
59 changes: 50 additions & 9 deletions index
Expand Up @@ -28888,6 +28888,14 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
ended. (Steps in <a href=#synchronous-section title="synchronous section">synchronous
sections</a> are marked with &#8987;.)</li>

<li>

<p>&#8987; If the <a href=#media-element>media element</a>'s
<a href=#blocked-on-parser>blocked-on-parser</a> flag is false, then <a href=#populate-the-list-of-pending-text-tracks>populate
the list of pending text tracks</a>.</p>

</li>

<li>

<p>&#8987; If the <a href=#media-element>media element</a> has a <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute, then let <var title="">mode</var> be <i title="">attribute</i>.</p>
Expand Down Expand Up @@ -29135,6 +29143,11 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
algorithm. This is now the element's <a href=#media-resource>media
resource</a>.</li>

<li><p>Remove all <a href=#media-resource-specific-text-track title="media-resource-specific text
track">media-resource-specific text tracks</a> from the
<a href=#media-element>media element</a>'s <a href=#list-of-pending-text-tracks>list of pending text
tracks</a>, if any.</p>

<li><p>Optionally, run the following substeps. This is the expected
behavior if the user agent intends to not attempt to fetch the
resource until the use requests it explicitly (e.g. as a way to
Expand Down Expand Up @@ -32834,15 +32847,43 @@ interface <dfn id=mediacontroller>MediaController</dfn> {
</dl><p>Each <a href=#text-track>text track</a> has a corresponding
<code><a href=#texttrack>TextTrack</a></code> object.</p>

<p>The <a href=#text-track title="text track">text tracks</a> of a
<a href=#media-element>media element</a> are <dfn id=the-text-tracks-are-ready title="the text tracks are
ready">ready</dfn> if all the <a href=#text-track title="text track">text
tracks</a> whose <a href=#text-track-mode title="text track mode">mode</a> was
not in the <a href=#text-track-disabled title="text track disabled">disabled</a> state
when the element's <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a> last started now have a <a href=#text-track-readiness-state>text track readiness
state</a> of <a href=#text-track-loaded title="text track loaded">loaded</a> or
<a href=#text-track-failed-to-load title="text track failed to load">failed to load</a>.</p>
<hr><p>Each <a href=#media-element>media element</a> has a <dfn id=list-of-pending-text-tracks>list of pending text
tracks</dfn>, which must initially be empty, and a
<dfn id=blocked-on-parser>blocked-on-parser</dfn> flag, which must initially be false.
When the user agent is required to <dfn id=populate-the-list-of-pending-text-tracks>populate the list of pending
text tracks</dfn> of a <a href=#media-element>media element</a>, the user agent
must add to the element's <a href=#list-of-pending-text-tracks>list of pending text tracks</a>
each <a href=#text-track>text track</a> in the element's <a href=#list-of-text-tracks>list of text
tracks</a> whose <a href=#text-track-mode>text track mode</a> is not <a href=#text-track-disabled title="text track disabled">disabled</a> and whose <a href=#text-track-readiness-state>text
track readiness state</a> is <!--either <span title="text track
not loaded">not loaded</span> or [there can't be any in the 'not
loaded' state that are not 'disabled']--> <a href=#text-track-loading title="text track
loading">loading</a>.</p>

<p>Whenever a <code><a href=#the-track-element>track</a></code> element's parent node changes, the
user agent must remove the corresponding <a href=#text-track>text track</a>
from any <a href=#list-of-pending-text-tracks>list of pending text tracks</a> that it is in.</p>

<p>Whenever a <a href=#text-track>text track</a>'s <a href=#text-track-readiness-state>text track readiness
state</a> changes to either <a href=#text-track-loaded title="text track
loaded">loaded</a> or <a href=#text-track-failed-to-load title="text track failed to
load">failed to load</a>, the user agent must remove it from any
<a href=#list-of-pending-text-tracks>list of pending text tracks</a> that it is in.</p>

<p>When a <a href=#media-element>media element</a> is created by an <a href=#html-parser>HTML
parser</a> or <a href=#xml-parser>XML parser</a>, the user agent must set
the element's <a href=#blocked-on-parser>blocked-on-parser</a> flag to true. When a
<a href=#media-element>media element</a> is popped off the <a href=#stack-of-open-elements>stack of open
elements</a> of an <a href=#html-parser>HTML parser</a> or <a href=#xml-parser>XML
parser</a>, the user agent must <a href=#populate-the-list-of-pending-text-tracks>populate the list of
pending text tracks</a> and set the element's
<a href=#blocked-on-parser>blocked-on-parser</a> flag to false.</p>

<p>The <a href=#text-track title="text track">text tracks</a> of a <a href=#media-element>media
element</a> are <dfn id=the-text-tracks-are-ready title="the text tracks are
ready">ready</dfn> when both the element's <a href=#list-of-pending-text-tracks>list of pending
text tracks</a> is empty and the element's
<a href=#blocked-on-parser>blocked-on-parser</a> flag is false.</p>

<hr><p>A <dfn id=text-track-cue>text track cue</dfn> is the unit of time-sensitive data
in a <a href=#text-track>text track</a>, corresponding for instance for
Expand Down
63 changes: 53 additions & 10 deletions source
Expand Up @@ -31260,6 +31260,14 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
ended. (Steps in <span title="synchronous section">synchronous
sections</span> are marked with &#x231B;.)</p></li>

<li>

<p>&#x231B; If the <span>media element</span>'s
<span>blocked-on-parser</span> flag is false, then <span>populate
the list of pending text tracks</span>.</p>

</li>

<li>

<p>&#x231B; If the <span>media element</span> has a <code
Expand Down Expand Up @@ -31573,6 +31581,11 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
algorithm. This is now the element's <span>media
resource</span>.</p></li>

<li><p>Remove all <span title="media-resource-specific text
track">media-resource-specific text tracks</span> from the
<span>media element</span>'s <span>list of pending text
tracks</span>, if any.</p>

<li><p>Optionally, run the following substeps. This is the expected
behavior if the user agent intends to not attempt to fetch the
resource until the use requests it explicitly (e.g. as a way to
Expand Down Expand Up @@ -35927,16 +35940,46 @@ interface <dfn>MediaController</dfn> {
<p>Each <span>text track</span> has a corresponding
<code>TextTrack</code> object.</p>

<p>The <span title="text track">text tracks</span> of a
<span>media element</span> are <dfn title="the text tracks are
ready">ready</dfn> if all the <span title="text track">text
tracks</span> whose <span title="text track mode">mode</span> was
not in the <span title="text track disabled">disabled</span> state
when the element's <span
title="concept-media-load-algorithm">resource selection
algorithm</span> last started now have a <span>text track readiness
state</span> of <span title="text track loaded">loaded</span> or
<span title="text track failed to load">failed to load</span>.</p>
<hr>

<p>Each <span>media element</span> has a <dfn>list of pending text
tracks</dfn>, which must initially be empty, and a
<dfn>blocked-on-parser</dfn> flag, which must initially be false.
When the user agent is required to <dfn>populate the list of pending
text tracks</dfn> of a <span>media element</span>, the user agent
must add to the element's <span>list of pending text tracks</span>
each <span>text track</span> in the element's <span>list of text
tracks</span> whose <span>text track mode</span> is not <span
title="text track disabled">disabled</span> and whose <span>text
track readiness state</span> is <!--either <span title="text track
not loaded">not loaded</span> or [there can't be any in the 'not
loaded' state that are not 'disabled']--> <span title="text track
loading">loading</span>.</p>

<p>Whenever a <code>track</code> element's parent node changes, the
user agent must remove the corresponding <span>text track</span>
from any <span>list of pending text tracks</span> that it is in.</p>

<p>Whenever a <span>text track</span>'s <span>text track readiness
state</span> changes to either <span title="text track
loaded">loaded</span> or <span title="text track failed to
load">failed to load</span>, the user agent must remove it from any
<span>list of pending text tracks</span> that it is in.</p>

<p>When a <span>media element</span> is created by an <span>HTML
parser</span> or <span>XML parser</span>, the user agent must set
the element's <span>blocked-on-parser</span> flag to true. When a
<span>media element</span> is popped off the <span>stack of open
elements</span> of an <span>HTML parser</span> or <span>XML
parser</span>, the user agent must <span>populate the list of
pending text tracks</span> and set the element's
<span>blocked-on-parser</span> flag to false.</p>

<p>The <span title="text track">text tracks</span> of a <span>media
element</span> are <dfn title="the text tracks are
ready">ready</dfn> when both the element's <span>list of pending
text tracks</span> is empty and the element's
<span>blocked-on-parser</span> flag is false.</p>

<hr>

Expand Down

0 comments on commit 6c7f934

Please sign in to comment.