Skip to content

Commit

Permalink
[giow] (2) Clear the 'audioTracks' and 'videoTracks' attributes when …
Browse files Browse the repository at this point in the history
…loading a new resource.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=19272
Affected topics: Video Text Tracks, Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@7854 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 26, 2013
1 parent 33f2a79 commit 43e8fdb
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 34 deletions.
27 changes: 14 additions & 13 deletions complete.html
Expand Up @@ -27303,7 +27303,7 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
<li><p>Set the element's <span>show poster flag</span> to true.</p></li>
-->

<li><p><a href="#forget-the-media-element's-media-resource-specific-text-tracks">Forget the media element's media-resource-specific text tracks</a>.</li>
<li><p><a href="#forget-the-media-element's-media-resource-specific-tracks">Forget the media element's media-resource-specific tracks</a>.</li>

<li><p>If <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is not set to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then set it to that state.
<!-- this can do the "report the controller state" thing -->
Expand Down Expand Up @@ -27440,7 +27440,7 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
<code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute
is set to <code title=dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED><a href=#dom-mediaerror-media_err_src_not_supported>MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>.</li>

<li><p><a href="#forget-the-media-element's-media-resource-specific-text-tracks">Forget the media element's media-resource-specific text tracks</a>.</li>
<li><p><a href="#forget-the-media-element's-media-resource-specific-tracks">Forget the media element's media-resource-specific tracks</a>.</li>

<li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute
to the <code title=dom-media-NETWORK_NO_SOURCE><a href=#dom-media-network_no_source>NETWORK_NO_SOURCE</a></code> value.</li>
Expand Down Expand Up @@ -27536,7 +27536,7 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
<a href=#synchronous-section>synchronous section</a> has ended. (Steps in <a href=#synchronous-section title="synchronous
section">synchronous sections</a> are marked with &#8987;.)</li>

<li><p>&#8987; <a href="#forget-the-media-element's-media-resource-specific-text-tracks">Forget the media element's media-resource-specific text
<li><p>&#8987; <a href="#forget-the-media-element's-media-resource-specific-tracks">Forget the media element's media-resource-specific
tracks</a>.</li>

<li><p>&#8987; <i title="">Find next candidate</i>: Let <var title="">candidate</var> be
Expand Down Expand Up @@ -28037,7 +28037,15 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
<li><p>If the user agent ever reaches this step (which can only happen if the entire resource
gets loaded and kept available): abort the overall <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection algorithm</a>.</li>

</ol></div>
</ol><p>When a <a href=#media-element>media element</a> is to <dfn id="forget-the-media-element's-media-resource-specific-tracks">forget the media element's media-resource-specific
tracks</dfn>, the user agent must remove from the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text
tracks</a> all the <a href=#media-resource-specific-text-track title="media-resource-specific text track">media-resource-specific
text tracks</a>, then empty the <a href=#media-element>media element</a>'s <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute's <code><a href=#audiotracklist>AudioTrackList</a></code> object,
then empty the <a href=#media-element>media element</a>'s <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code>
attribute's <code><a href=#videotracklist>VideoTrackList</a></code> object. No events (in particular, no <code title=event-removetrack>removetrack</code> events) are fired as part of this; the <code title=event-media-error><a href=#event-media-error>error</a></code> and <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
events, fired by the algorithms that invoke this one, can be used instead.</p>

</div>

<hr><p>The <dfn id=attr-media-preload title=attr-media-preload><code>preload</code></dfn> attribute is an <a href=#enumerated-attribute>enumerated
attribute</a>. The following table lists the keywords and states for the attribute &mdash; the
Expand Down Expand Up @@ -30948,15 +30956,8 @@ <h6 id=sourcing-in-band-text-tracks><span class=secno>4.8.10.12.2 </span>Sourcin
</ol><!-- removetrack: we don't currently ever remove an in-band text track, because it might have been
manipulated or might be about to be manipulated. If we made in-band text tracks readonly, we could
probably get away with cleaning them up when they fall into the time before the earliest possible
position and are known to be over and done with. --><p>When a <a href=#media-element>media element</a> is to <dfn id="forget-the-media-element's-media-resource-specific-text-tracks">forget the media element's media-resource-specific
text tracks</dfn>, the user agent must remove from the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of
text tracks</a> all the <a href=#media-resource-specific-text-track title="media-resource-specific text
track">media-resource-specific text tracks</a>.</p>

<!-- if, after in-band text tracks have been found, there's no out-of-band text tracks, then apply
user prefs? -->

</div>
position and are known to be over and done with. --><!-- if, after in-band text tracks have been found, there's no out-of-band text tracks, then apply
user prefs? --></div>



Expand Down
27 changes: 14 additions & 13 deletions index
Expand Up @@ -27303,7 +27303,7 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement
<li><p>Set the element's <span>show poster flag</span> to true.</p></li>
-->

<li><p><a href="#forget-the-media-element's-media-resource-specific-text-tracks">Forget the media element's media-resource-specific text tracks</a>.</li>
<li><p><a href="#forget-the-media-element's-media-resource-specific-tracks">Forget the media element's media-resource-specific tracks</a>.</li>

<li><p>If <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is not set to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then set it to that state.
<!-- this can do the "report the controller state" thing -->
Expand Down Expand Up @@ -27440,7 +27440,7 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement
<code><a href=#mediaerror>MediaError</a></code> object whose <code title=dom-MediaError-code><a href=#dom-mediaerror-code>code</a></code> attribute
is set to <code title=dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED><a href=#dom-mediaerror-media_err_src_not_supported>MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>.</li>

<li><p><a href="#forget-the-media-element's-media-resource-specific-text-tracks">Forget the media element's media-resource-specific text tracks</a>.</li>
<li><p><a href="#forget-the-media-element's-media-resource-specific-tracks">Forget the media element's media-resource-specific tracks</a>.</li>

<li><p>Set the element's <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute
to the <code title=dom-media-NETWORK_NO_SOURCE><a href=#dom-media-network_no_source>NETWORK_NO_SOURCE</a></code> value.</li>
Expand Down Expand Up @@ -27536,7 +27536,7 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement
<a href=#synchronous-section>synchronous section</a> has ended. (Steps in <a href=#synchronous-section title="synchronous
section">synchronous sections</a> are marked with &#8987;.)</li>

<li><p>&#8987; <a href="#forget-the-media-element's-media-resource-specific-text-tracks">Forget the media element's media-resource-specific text
<li><p>&#8987; <a href="#forget-the-media-element's-media-resource-specific-tracks">Forget the media element's media-resource-specific
tracks</a>.</li>

<li><p>&#8987; <i title="">Find next candidate</i>: Let <var title="">candidate</var> be
Expand Down Expand Up @@ -28037,7 +28037,15 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement
<li><p>If the user agent ever reaches this step (which can only happen if the entire resource
gets loaded and kept available): abort the overall <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection algorithm</a>.</li>

</ol></div>
</ol><p>When a <a href=#media-element>media element</a> is to <dfn id="forget-the-media-element's-media-resource-specific-tracks">forget the media element's media-resource-specific
tracks</dfn>, the user agent must remove from the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text
tracks</a> all the <a href=#media-resource-specific-text-track title="media-resource-specific text track">media-resource-specific
text tracks</a>, then empty the <a href=#media-element>media element</a>'s <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute's <code><a href=#audiotracklist>AudioTrackList</a></code> object,
then empty the <a href=#media-element>media element</a>'s <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code>
attribute's <code><a href=#videotracklist>VideoTrackList</a></code> object. No events (in particular, no <code title=event-removetrack>removetrack</code> events) are fired as part of this; the <code title=event-media-error><a href=#event-media-error>error</a></code> and <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code>
events, fired by the algorithms that invoke this one, can be used instead.</p>

</div>

<hr><p>The <dfn id=attr-media-preload title=attr-media-preload><code>preload</code></dfn> attribute is an <a href=#enumerated-attribute>enumerated
attribute</a>. The following table lists the keywords and states for the attribute &mdash; the
Expand Down Expand Up @@ -30948,15 +30956,8 @@ interface <dfn id=mediacontroller>MediaController</dfn> : <a href=#eventtarget>E
</ol><!-- removetrack: we don't currently ever remove an in-band text track, because it might have been
manipulated or might be about to be manipulated. If we made in-band text tracks readonly, we could
probably get away with cleaning them up when they fall into the time before the earliest possible
position and are known to be over and done with. --><p>When a <a href=#media-element>media element</a> is to <dfn id="forget-the-media-element's-media-resource-specific-text-tracks">forget the media element's media-resource-specific
text tracks</dfn>, the user agent must remove from the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of
text tracks</a> all the <a href=#media-resource-specific-text-track title="media-resource-specific text
track">media-resource-specific text tracks</a>.</p>

<!-- if, after in-band text tracks have been found, there's no out-of-band text tracks, then apply
user prefs? -->

</div>
position and are known to be over and done with. --><!-- if, after in-band text tracks have been found, there's no out-of-band text tracks, then apply
user prefs? --></div>



Expand Down
22 changes: 14 additions & 8 deletions source
Expand Up @@ -28895,7 +28895,7 @@ interface <dfn>HTMLMediaElement</dfn> : <span>HTMLElement</span> {
<li><p>Set the element's <span>show poster flag</span> to true.</p></li>
-->

<li><p><span>Forget the media element's media-resource-specific text tracks</span>.</p></li>
<li><p><span>Forget the media element's media-resource-specific tracks</span>.</p></li>

<li><p>If <code title="dom-media-readyState">readyState</code> is not set to <code
title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, then set it to that state.
Expand Down Expand Up @@ -29059,7 +29059,7 @@ interface <dfn>HTMLMediaElement</dfn> : <span>HTMLElement</span> {
is set to <code
title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED">MEDIA_ERR_SRC_NOT_SUPPORTED</code>.</p></li>

<li><p><span>Forget the media element's media-resource-specific text tracks</span>.</p></li>
<li><p><span>Forget the media element's media-resource-specific tracks</span>.</p></li>

<li><p>Set the element's <code title="dom-media-networkState">networkState</code> attribute
to the <code title="dom-media-NETWORK_NO_SOURCE">NETWORK_NO_SOURCE</code> value.</p></li>
Expand Down Expand Up @@ -29182,7 +29182,7 @@ interface <dfn>HTMLMediaElement</dfn> : <span>HTMLElement</span> {
<span>synchronous section</span> has ended. (Steps in <span title="synchronous
section">synchronous sections</span> are marked with &#x231B;.)</p></li>

<li><p>&#x231B; <span>Forget the media element's media-resource-specific text
<li><p>&#x231B; <span>Forget the media element's media-resource-specific
tracks</span>.</p></li>

<li><p>&#x231B; <i title="">Find next candidate</i>: Let <var title="">candidate</var> be
Expand Down Expand Up @@ -29778,6 +29778,17 @@ interface <dfn>HTMLMediaElement</dfn> : <span>HTMLElement</span> {

</ol>

<p>When a <span>media element</span> is to <dfn>forget the media element's media-resource-specific
tracks</dfn>, the user agent must remove from the <span>media element</span>'s <span>list of text
tracks</span> all the <span title="media-resource-specific text track">media-resource-specific
text tracks</span>, then empty the <span>media element</span>'s <code
title="dom-media-audioTracks">audioTracks</code> attribute's <code>AudioTrackList</code> object,
then empty the <span>media element</span>'s <code title="dom-media-videoTracks">videoTracks</code>
attribute's <code>VideoTrackList</code> object. No events (in particular, no <code
title="event-removetrack">removetrack</code> events) are fired as part of this; the <code
title="event-media-error">error</code> and <code title="event-media-emptied">emptied</code>
events, fired by the algorithms that invoke this one, can be used instead.</p>

</div>

<hr>
Expand Down Expand Up @@ -33182,11 +33193,6 @@ interface <dfn>MediaController</dfn> : <span>EventTarget</span> {
probably get away with cleaning them up when they fall into the time before the earliest possible
position and are known to be over and done with. -->

<p>When a <span>media element</span> is to <dfn>forget the media element's media-resource-specific
text tracks</dfn>, the user agent must remove from the <span>media element</span>'s <span>list of
text tracks</span> all the <span title="media-resource-specific text
track">media-resource-specific text tracks</span>.</p>

<!-- if, after in-band text tracks have been found, there's no out-of-band text tracks, then apply
user prefs? -->

Expand Down

0 comments on commit 43e8fdb

Please sign in to comment.