Skip to content

Commit

Permalink
[giow] (1) Match implementations better regarding intrinsic size of <…
Browse files Browse the repository at this point in the history
…video> with poster frame. This also changes the show poster flag to not change while script is running, so that you can't detect the change in intrinsic size if playback begins while script is executing.

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

git-svn-id: http://svn.whatwg.org/webapps@7553 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 30, 2012
1 parent e868fbd commit 2191bc5
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 96 deletions.
67 changes: 38 additions & 29 deletions complete.html
Expand Up @@ -27872,17 +27872,15 @@ <h4 id=the-video-element><span class=secno>4.8.6 </span>The <dfn id=video><code>
requirement can be implemented by using the <a href=#video-object-fit>style rule suggested in the rendering
section</a>.</p>

<p>The intrinsic width of a <code><a href=#the-video-element>video</a></code> element's playback
area is the <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic
width</a> of the video resource, if that is available; otherwise
it is the intrinsic width of the <a href=#poster-frame>poster frame</a>, if that
is available; otherwise it is 300 CSS pixels.</p>

<p>The intrinsic height of a <code><a href=#the-video-element>video</a></code> element's playback
area is the <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic
height</a> of the video resource, if that is available; otherwise
it is the intrinsic height of the <a href=#poster-frame>poster frame</a>, if that
is available; otherwise it is 150 CSS pixels.</p>
<p>The intrinsic width of a <code><a href=#the-video-element>video</a></code> element's playback area is the intrinsic width of
the <a href=#poster-frame>poster frame</a>, if that is available and the element currently
<a href=#represents>represents</a> its poster frame; otherwise, it is the <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a> of the video resource, if that is
available; otherwise it is 300 CSS pixels.</p>

<p>The intrinsic height of a <code><a href=#the-video-element>video</a></code> element's playback area is the intrinsic height of
the <a href=#poster-frame>poster frame</a>, if that is available and the element currently
<a href=#represents>represents</a> its poster frame; otherwise it is the <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video resource, if that is
available; otherwise it is 150 CSS pixels.</p>

<hr><p>User agents should provide controls to enable or disable the
display of closed captions, audio description tracks, and other
Expand Down Expand Up @@ -29585,14 +29583,20 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-error><a href=#event-media-error>error</a></code> at
the <a href=#media-element>media element</a>.</li>

<li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, 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_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> value and <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the element.
Otherwise, 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_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.</li>
<li>

<li><p>Set the element's <a href=#delaying-the-load-event-flag>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event title="delay the load event">delaying the load event</a>.</li>
<p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code>
attribute has a value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, 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_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> value, set the element's
<a href=#show-poster-flag>show poster flag</a> to true, and <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the element.</p>

<li><p>Set the element's <a href=#show-poster-flag>show poster flag</a> to true.</li>
<p>Otherwise, 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_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.</p>

</li>

<li><p>Set the element's <a href=#delaying-the-load-event-flag>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event title="delay the load event">delaying the load event</a>.</li>

<li><p>Abort the overall <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a>.</li>
Expand All @@ -29618,14 +29622,20 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-media-abort><a href=#event-media-abort>abort</a></code> at
the <a href=#media-element>media element</a>.</li>

<li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute has a value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, 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_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> value and <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the element.
Otherwise, 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_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.</li>
<li>

<p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code>
attribute has a value equal to <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, 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_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> value, set the element's
<a href=#show-poster-flag>show poster flag</a> to true, and <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-emptied><a href=#event-media-emptied>emptied</a></code> at the element.</p>

<li><p>Set the element's <a href=#delaying-the-load-event-flag>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event title="delay the load event">delaying the load event</a>.</li>
<p>Otherwise, 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_IDLE><a href=#dom-media-network_idle>NETWORK_IDLE</a></code> value.</p>

<li><p>Set the element's <a href=#show-poster-flag>show poster flag</a> to true.</li>
</li>

<li><p>Set the element's <a href=#delaying-the-load-event-flag>delaying-the-load-event flag</a> to false. This stops <a href=#delay-the-load-event title="delay the load event">delaying the load event</a>.</li>

<li><p>Abort the overall <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a>.</li>
Expand Down Expand Up @@ -30181,8 +30191,9 @@ <h5 id=ready-states><span class=secno>4.8.10.7 </span>Ready states</h5>
<a href=#media-element>media element</a>'s <code><a href=#document>Document</a></code>'s <a href=#active-sandboxing-flag-set>active sandboxing flag set</a>
does not have the <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing context flag</a> set, then
the user agent may also set the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute to
false, <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-play><a href=#event-media-play>play</a></code>, and <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-playing><a href=#event-media-playing>playing</a></code>.</p>
false, set the element's <a href=#show-poster-flag>show poster flag</a> to false, <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-play><a href=#event-media-play>play</a></code>, and
<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-playing><a href=#event-media-playing>playing</a></code>.</p>

<p class=note>User agents do not need to support autoplay, and it is suggested that user
agents honor user preferences on the matter. Authors are urged to use the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute rather than using script to force the
Expand Down Expand Up @@ -30495,6 +30506,8 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the

<ol><li><p>Change the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> to false.</li>

<li><p>Set the element's <a href=#show-poster-flag>show poster flag</a> to false.</li>

<li><p><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-play><a href=#event-media-play>play</a></code> at the element.</li>

<li>
Expand Down Expand Up @@ -30575,10 +30588,6 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the
the stream's playback rate) the client doesn't actually have to drop or interpolate any
frames.</p>

<p>Any time a <a href=#media-element>media element</a>'s <a href=#current-playback-position>current playback position</a> changes due to
the monotonic increase required above, the element's <a href=#show-poster-flag>show poster flag</a> must be set to
false.</p>

<p>Any time the user agent <a href=#provide-a-stable-state title="provide a stable state">provides a stable state</a>,
the <a href=#official-playback-position>official playback position</a> must be set to the <a href=#current-playback-position>current playback
position</a>.</p>
Expand Down

0 comments on commit 2191bc5

Please sign in to comment.