Skip to content
Permalink
Browse files

[giow] (1) Add a 'resize' event to <video> elements for when the vide…

…o data changes dimensions.

Affected topics: HTML, Video Text Tracks, Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@8347 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Dec 12, 2013
1 parent da7a93b commit fdb94d7d6a2e8c14299da8f58c3e81702cb01371
Showing with 89 additions and 8 deletions.
  1. +26 −2 complete.html
  2. +26 −2 index
  3. +37 −4 source
the <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video in CSS
pixels. If the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then the attributes must return 0.</p>

<p id=dimUpdate>Whenever the <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>
or <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video changes
(including, for example, because the <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected video
track</a> was changed), if the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code>
attribute is not <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, 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-resize><a href=#event-media-resize>resize</a></code> at the <a href=#media-element>media element</a>.</p>

</div>

<p>The <code><a href=#the-video-element>video</a></code> element supports <a href=#dimension-attributes>dimension attributes</a>.</p>

</li>

<li><p>For <code><a href=#the-video-element>video</a></code> elements, set the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes.</li>
<li>

<p>For <code><a href=#the-video-element>video</a></code> elements, set the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes.</p>

<p class=note>At this point, <code title=event-media-resize><a href=#event-media-resize>resize</a></code> events can
start firing.</p>

</li>

<li>

<code><a href=#videotrack>VideoTrack</a></code> object.)</p>

<p>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.</p>
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>

<hr><p>The following are the <a href=#event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type title="event
handler event type">event handler event types</a>) <span class=impl>that must be</span> supported, as <a href=#event-handler-idl-attributes>event handler IDL attributes</a>,

<td>

<tbody><tr><td><dfn id=event-media-resize title=event-media-resize><code>resize</code></dfn>

<td><code><a href=#event>Event</a></code>

<td>One or both of the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes have just been updated.

<td><a href=#media-element>Media element</a> is a <code><a href=#the-video-element>video</a></code> element; <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is not <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>

<tr><td><dfn id=event-media-volumechange title=event-media-volumechange><code>volumechange</code></dfn>

<td><code><a href=#event>Event</a></code>
&Acy;&lcy;&iecy;&kcy;&scy;&iecy;&jcy; &Pcy;&rcy;&ocy;&scy;&kcy;&ucy;&rcy;&yacy;&kcy;&ocy;&vcy; (Alexey Proskuryakov),
Alexis Deveria,
Allan Clements,
Ami Fischman,
Amos Jeffries,
Anders Carlsson,
Andr&eacute; E. Veltstra,
28 index
the <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video in CSS
pixels. If the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then the attributes must return 0.</p>

<p id=dimUpdate>Whenever the <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>
or <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a> of the video changes
(including, for example, because the <a href=#dom-videotrack-selected title=dom-VideoTrack-selected>selected video
track</a> was changed), if the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code>
attribute is not <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, 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-resize><a href=#event-media-resize>resize</a></code> at the <a href=#media-element>media element</a>.</p>

</div>

<p>The <code><a href=#the-video-element>video</a></code> element supports <a href=#dimension-attributes>dimension attributes</a>.</p>

</li>

<li><p>For <code><a href=#the-video-element>video</a></code> elements, set the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes.</li>
<li>

<p>For <code><a href=#the-video-element>video</a></code> elements, set the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes.</p>

<p class=note>At this point, <code title=event-media-resize><a href=#event-media-resize>resize</a></code> events can
start firing.</p>

</li>

<li>

<code><a href=#videotrack>VideoTrack</a></code> object.)</p>

<p>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.</p>
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>

<hr><p>The following are the <a href=#event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type title="event
handler event type">event handler event types</a>) <span class=impl>that must be</span> supported, as <a href=#event-handler-idl-attributes>event handler IDL attributes</a>,

<td>

<tbody><tr><td><dfn id=event-media-resize title=event-media-resize><code>resize</code></dfn>

<td><code><a href=#event>Event</a></code>

<td>One or both of the <code title=dom-video-videoWidth><a href=#dom-video-videowidth>videoWidth</a></code> and <code title=dom-video-videoHeight><a href=#dom-video-videoheight>videoHeight</a></code> attributes have just been updated.

<td><a href=#media-element>Media element</a> is a <code><a href=#the-video-element>video</a></code> element; <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is not <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>

<tr><td><dfn id=event-media-volumechange title=event-media-volumechange><code>volumechange</code></dfn>

<td><code><a href=#event>Event</a></code>
&Acy;&lcy;&iecy;&kcy;&scy;&iecy;&jcy; &Pcy;&rcy;&ocy;&scy;&kcy;&ucy;&rcy;&yacy;&kcy;&ocy;&vcy; (Alexey Proskuryakov),
Alexis Deveria,
Allan Clements,
Ami Fischman,
Amos Jeffries,
Anders Carlsson,
Andr&eacute; E. Veltstra,
41 source
pixels. If the element's <code data-x="dom-media-readyState">readyState</code> attribute is <code
data-x="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, then the attributes must return 0.</p>

<p id="dimUpdate">Whenever the <span data-x="concept-video-intrinsic-width">intrinsic width</span>
or <span data-x="concept-video-intrinsic-height">intrinsic height</span> of the video changes
(including, for example, because the <span data-x="dom-VideoTrack-selected">selected video
track</span> was changed), if the element's <code data-x="dom-media-readyState">readyState</code>
attribute is not <code data-x="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, the user agent must
<span>queue a task</span> to <span>fire a simple event</span> named <code
data-x="event-media-resize">resize</code> at the <span>media element</span>.</p>

</div>

<p>The <code>video</code> element supports <span>dimension attributes</span>.</p>

</li>

<li><p>For <code>video</code> elements, set the <code
data-x="dom-video-videoWidth">videoWidth</code> and <code
data-x="dom-video-videoHeight">videoHeight</code> attributes.</p></li>
<li>

<p>For <code>video</code> elements, set the <code
data-x="dom-video-videoWidth">videoWidth</code> and <code
data-x="dom-video-videoHeight">videoHeight</code> attributes.</p>

<p class="note">At this point, <code data-x="event-media-resize">resize</code> events can
start firing.</p>

</li>

<li>


<p>Whenever a track in a <code>VideoTrackList</code> that was previously not selected is selected,
the user agent must <span>queue a task</span> to <span>fire a simple event</span> named <code
data-x="event-media-change">change</code> at the <code>VideoTrackList</code> object.</p>
data-x="event-media-change">change</code> at the <code>VideoTrackList</code> object. This <span
data-x="concept-task">task</span> must be <span data-x="queue a task">queued</span> before the
<span data-x="concept-task">task</span> that fires the <code
data-x="event-media-resize">resize</code> event, if any.</p>

<hr>


<td>

<tbody>
<tr>

<td><dfn data-x="event-media-resize"><code>resize</code></dfn>

<td><code>Event</code>

<td>One or both of the <code data-x="dom-video-videoWidth">videoWidth</code> and <code
data-x="dom-video-videoHeight">videoHeight</code> attributes have just been updated.

<td><span>Media element</span> is a <code>video</code> element; <code
data-x="dom-media-readyState">readyState</code> is not <code
data-x="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>

<tr>

<td><dfn data-x="event-media-volumechange"><code>volumechange</code></dfn>
&#1040;&#1083;&#1077;&#1082;&#1089;&#1077;&#1081; &#1055;&#1088;&#1086;&#1089;&#1082;&#1091;&#1088;&#1103;&#1082;&#1086;&#1074; (Alexey Proskuryakov),
Alexis Deveria,
Allan Clements,
Ami Fischman,
Amos Jeffries,
Anders Carlsson,
Andr&eacute; E. Veltstra,

0 comments on commit fdb94d7

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