Skip to content
Permalink
Browse files

[giow] (2) Make sure that we say that enabling audio tracks and selec…

…ting video tracks is all synchronised with the event loop

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

git-svn-id: http://svn.whatwg.org/webapps@8673 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Jun 11, 2014
1 parent 85e17e6 commit 8e91b346a54395257ab51eb5c72aacb21a9555ee
Showing with 64 additions and 27 deletions.
  1. +21 −9 complete.html
  2. +21 −9 index
  3. +22 −9 source
frame corresponding to the <a href=#current-playback-position>current playback position</a> in the video, the new frame
must be rendered.</dd>

</dl><p class=note>Which frame in a video stream corresponds to a particular playback position is
</dl><p>Frames of video must be obtained from the video track that was <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected</a> when the <a href=#event-loop>event loop</a> last reached
step 1.</p>

<p class=note>Which frame in a video stream corresponds to a particular playback position is
defined by the video stream's format.</p>

<p>The <code><a href=#the-video-element>video</a></code> element also <a href=#represents>represents</a> any <a href=#text-track-cue title="text track
cue">text track cues</a> whose <a href=#text-track-cue-active-flag>text track cue active flag</a> is set and whose
<a href=#text-track>text track</a> is in the <a href=#text-track-showing title="text track showing">showing</a> mode, and any
audio from the <a href=#media-resource>media resource</a>, at the <a href=#current-playback-position>current playback position</a>.</p>

<!--CLEANUP-->
<p>Any audio associated with the <a href=#media-resource>media resource</a> must, if played, be played
synchronised with the <a href=#current-playback-position>current playback position</a>, at the element's <a href=#effective-media-volume>effective
media volume</a>.</p>
media volume</a>. The user agent must play the audio from audio tracks that were <a href=#dom-audiotrack-enabled title=dom-AudioTrack-enabled>enabled</a> when
the <a href=#event-loop>event loop</a> last reached step 1.</p>

<p>In addition to the above, the user agent may provide messages to the user (such as "buffering",
"no video loaded", "error", or more detailed information) by overlaying text or icons on the video

<p>When an <code><a href=#the-audio-element>audio</a></code> element is <a href=#potentially-playing>potentially playing</a>, it must have its audio
data played synchronised with the <a href=#current-playback-position>current playback position</a>, at the element's
<a href=#effective-media-volume>effective media volume</a>.</p>
<a href=#effective-media-volume>effective media volume</a>. The user agent must play the audio from audio tracks that
were enabled when the <a href=#event-loop>event loop</a> last reached step 1.</p>

<p>When an <code><a href=#the-audio-element>audio</a></code> element is not <a href=#potentially-playing>potentially playing</a>, audio must not play
for the element.</p>

</p>

<!--CLEANUP-->
<p>A <a href=#media-resource>media resource</a> can have multiple audio and video tracks. For the purposes of a
<a href=#media-element>media element</a>, the video data of the <a href=#media-resource>media resource</a> is only that of the
currently selected track (if any) given by the element's <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code> attribute, and the audio data of the <a href=#media-resource>media
currently selected track (if any) as given by the element's <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code> attribute when the <a href=#event-loop>event loop</a> last reached step 1, and the audio data of the <a href=#media-resource>media
resource</a> is the result of mixing all the currently enabled tracks (if any) given by the
element's <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute.</p>
element's <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute when the the <a href=#event-loop>event loop</a> last reached step 1.</p>

<p class=note>Both <code><a href=#the-audio-element>audio</a></code> and <code><a href=#the-video-element>video</a></code> elements can be used for both audio
and video. The main difference between the two is simply that the <code><a href=#the-audio-element>audio</a></code> element has

</li>

<!--CLEANUP-->
<li><p>If <var title="">enable</var> is still <i>unknown</i>, then, if the <a href=#media-element>media
element</a> does not yet have a selected audio track, then set <var title="">enable</var>
element</a> does not yet have an <a href=#dom-audiotrack-enabled title=dom-AudioTrack-enabled>enabled</a> audio track, then set <var title="">enable</var>
to <i>true</i>, otherwise, set <var title="">enable</var> to <i>false</i>.</li>

<li><p>If <var title="">enable</var> is <i>true</i>, then enable this audio track,

</li>

<!--CLEANUP-->
<li><p>If <var title="">enable</var> is still <i>unknown</i>, then, if the <a href=#media-element>media
element</a> does not yet have a selected video track, then set <var title="">enable</var>
element</a> does not yet have a <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected</a> video track, then set <var title="">enable</var>
to <i>true</i>, otherwise, set <var title="">enable</var> to <i>false</i>.</li>

<li><p>If <var title="">enable</var> is <i>true</i>, then select this track and unselect any

</li>

<li><p>If there is no enabled audio track, then enable an audio track. This <a href=#toggle-audio-track>will cause a <code title=event-media-change>change</code> event
<!--CLEANUP-->
<li><p>If there is no <a href=#dom-audiotrack-enabled title=dom-AudioTrack-enabled>enabled</a> audio track, then enable an audio track. This <a href=#toggle-audio-track>will cause a <code title=event-media-change>change</code> event
to be fired</a>.</li>

<li><p>If there is no selected video track, then select a video track. This <a href=#toggle-video-track>will cause a <code title=event-media-change>change</code> event
<!--CLEANUP-->
<li><p>If there is no <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected</a> video track, then select a video track. This <a href=#toggle-video-track>will cause a <code title=event-media-change>change</code> event
to be fired</a>.</li>

<li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media controller</a>, then:
being selected or unselected has no effect beyond changing the value of the attribute on the
<code><a href=#videotrack>VideoTrack</a></code> object.)</p>

<!--CLEANUP-->
<p id=toggle-video-track>Whenever a track in a <code><a href=#videotracklist>VideoTrackList</a></code> that was previously not selected is selected,
the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-change><a href=#event-media-change>change</a></code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object. This <a href=#concept-task title=concept-task>task</a> must be <a href=#queue-a-task title="queue a task">queued</a> before the
<a href=#concept-task title=concept-task>task</a> that fires the <code title=event-media-resize><a href=#event-media-resize>resize</a></code> event, if any.</p>
30 index
frame corresponding to the <a href=#current-playback-position>current playback position</a> in the video, the new frame
must be rendered.</dd>

</dl><p class=note>Which frame in a video stream corresponds to a particular playback position is
</dl><p>Frames of video must be obtained from the video track that was <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected</a> when the <a href=#event-loop>event loop</a> last reached
step 1.</p>

<p class=note>Which frame in a video stream corresponds to a particular playback position is
defined by the video stream's format.</p>

<p>The <code><a href=#the-video-element>video</a></code> element also <a href=#represents>represents</a> any <a href=#text-track-cue title="text track
cue">text track cues</a> whose <a href=#text-track-cue-active-flag>text track cue active flag</a> is set and whose
<a href=#text-track>text track</a> is in the <a href=#text-track-showing title="text track showing">showing</a> mode, and any
audio from the <a href=#media-resource>media resource</a>, at the <a href=#current-playback-position>current playback position</a>.</p>

<!--CLEANUP-->
<p>Any audio associated with the <a href=#media-resource>media resource</a> must, if played, be played
synchronised with the <a href=#current-playback-position>current playback position</a>, at the element's <a href=#effective-media-volume>effective
media volume</a>.</p>
media volume</a>. The user agent must play the audio from audio tracks that were <a href=#dom-audiotrack-enabled title=dom-AudioTrack-enabled>enabled</a> when
the <a href=#event-loop>event loop</a> last reached step 1.</p>

<p>In addition to the above, the user agent may provide messages to the user (such as "buffering",
"no video loaded", "error", or more detailed information) by overlaying text or icons on the video

<p>When an <code><a href=#the-audio-element>audio</a></code> element is <a href=#potentially-playing>potentially playing</a>, it must have its audio
data played synchronised with the <a href=#current-playback-position>current playback position</a>, at the element's
<a href=#effective-media-volume>effective media volume</a>.</p>
<a href=#effective-media-volume>effective media volume</a>. The user agent must play the audio from audio tracks that
were enabled when the <a href=#event-loop>event loop</a> last reached step 1.</p>

<p>When an <code><a href=#the-audio-element>audio</a></code> element is not <a href=#potentially-playing>potentially playing</a>, audio must not play
for the element.</p>

</p>

<!--CLEANUP-->
<p>A <a href=#media-resource>media resource</a> can have multiple audio and video tracks. For the purposes of a
<a href=#media-element>media element</a>, the video data of the <a href=#media-resource>media resource</a> is only that of the
currently selected track (if any) given by the element's <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code> attribute, and the audio data of the <a href=#media-resource>media
currently selected track (if any) as given by the element's <code title=dom-media-videoTracks><a href=#dom-media-videotracks>videoTracks</a></code> attribute when the <a href=#event-loop>event loop</a> last reached step 1, and the audio data of the <a href=#media-resource>media
resource</a> is the result of mixing all the currently enabled tracks (if any) given by the
element's <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute.</p>
element's <code title=dom-media-audioTracks><a href=#dom-media-audiotracks>audioTracks</a></code> attribute when the the <a href=#event-loop>event loop</a> last reached step 1.</p>

<p class=note>Both <code><a href=#the-audio-element>audio</a></code> and <code><a href=#the-video-element>video</a></code> elements can be used for both audio
and video. The main difference between the two is simply that the <code><a href=#the-audio-element>audio</a></code> element has

</li>

<!--CLEANUP-->
<li><p>If <var title="">enable</var> is still <i>unknown</i>, then, if the <a href=#media-element>media
element</a> does not yet have a selected audio track, then set <var title="">enable</var>
element</a> does not yet have an <a href=#dom-audiotrack-enabled title=dom-AudioTrack-enabled>enabled</a> audio track, then set <var title="">enable</var>
to <i>true</i>, otherwise, set <var title="">enable</var> to <i>false</i>.</li>

<li><p>If <var title="">enable</var> is <i>true</i>, then enable this audio track,

</li>

<!--CLEANUP-->
<li><p>If <var title="">enable</var> is still <i>unknown</i>, then, if the <a href=#media-element>media
element</a> does not yet have a selected video track, then set <var title="">enable</var>
element</a> does not yet have a <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected</a> video track, then set <var title="">enable</var>
to <i>true</i>, otherwise, set <var title="">enable</var> to <i>false</i>.</li>

<li><p>If <var title="">enable</var> is <i>true</i>, then select this track and unselect any

</li>

<li><p>If there is no enabled audio track, then enable an audio track. This <a href=#toggle-audio-track>will cause a <code title=event-media-change>change</code> event
<!--CLEANUP-->
<li><p>If there is no <a href=#dom-audiotrack-enabled title=dom-AudioTrack-enabled>enabled</a> audio track, then enable an audio track. This <a href=#toggle-audio-track>will cause a <code title=event-media-change>change</code> event
to be fired</a>.</li>

<li><p>If there is no selected video track, then select a video track. This <a href=#toggle-video-track>will cause a <code title=event-media-change>change</code> event
<!--CLEANUP-->
<li><p>If there is no <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected</a> video track, then select a video track. This <a href=#toggle-video-track>will cause a <code title=event-media-change>change</code> event
to be fired</a>.</li>

<li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media controller</a>, then:
being selected or unselected has no effect beyond changing the value of the attribute on the
<code><a href=#videotrack>VideoTrack</a></code> object.)</p>

<!--CLEANUP-->
<p id=toggle-video-track>Whenever a track in a <code><a href=#videotracklist>VideoTrackList</a></code> that was previously not selected is selected,
the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-change><a href=#event-media-change>change</a></code> at the <code><a href=#videotracklist>VideoTrackList</a></code> object. This <a href=#concept-task title=concept-task>task</a> must be <a href=#queue-a-task title="queue a task">queued</a> before the
<a href=#concept-task title=concept-task>task</a> that fires the <code title=event-media-resize><a href=#event-media-resize>resize</a></code> event, if any.</p>

0 comments on commit 8e91b34

Please sign in to comment.
You can’t perform that action at this time.