[html5] r8347 - [giow] (1) Add a 'resize' event to <video> elements for when the video data chan [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Dec 12 12:05:53 PST 2013


Author: ianh
Date: 2013-12-12 12:05:51 -0800 (Thu, 12 Dec 2013)
New Revision: 8347

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Add a 'resize' event to <video> elements for when the video data changes dimensions.
Affected topics: HTML, Video Text Tracks, Video and Audio

Modified: complete.html
===================================================================
--- complete.html	2013-12-12 17:30:28 UTC (rev 8346)
+++ complete.html	2013-12-12 20:05:51 UTC (rev 8347)
@@ -24562,6 +24562,13 @@
   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>
@@ -26139,8 +26146,15 @@
 
        </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>
 
         <p>Set the <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute to <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>.</p>
@@ -28066,7 +28080,8 @@
   <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>,
@@ -30916,6 +30931,14 @@
 
      <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>
@@ -101837,6 +101860,7 @@
   Алексей Проскуряков (Alexey Proskuryakov),
   Alexis Deveria,
   Allan Clements,
+  Ami Fischman,
   Amos Jeffries,
   Anders Carlsson,
   André E. Veltstra,

Modified: index
===================================================================
--- index	2013-12-12 17:30:28 UTC (rev 8346)
+++ index	2013-12-12 20:05:51 UTC (rev 8347)
@@ -24562,6 +24562,13 @@
   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>
@@ -26139,8 +26146,15 @@
 
        </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>
 
         <p>Set the <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute to <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>.</p>
@@ -28066,7 +28080,8 @@
   <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>,
@@ -30916,6 +30931,14 @@
 
      <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>
@@ -101837,6 +101860,7 @@
   Алексей Проскуряков (Alexey Proskuryakov),
   Alexis Deveria,
   Allan Clements,
+  Ami Fischman,
   Amos Jeffries,
   Anders Carlsson,
   André E. Veltstra,

Modified: source
===================================================================
--- source	2013-12-12 17:30:28 UTC (rev 8346)
+++ source	2013-12-12 20:05:51 UTC (rev 8347)
@@ -25928,6 +25928,14 @@
   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>
@@ -27745,10 +27753,17 @@
 
        </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>Set the <code data-x="dom-media-readyState">readyState</code> attribute to <code
@@ -30015,7 +30030,10 @@
 
   <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>
 
@@ -33357,8 +33375,22 @@
 
      <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>
 
      <td><code>Event</code>
@@ -113800,6 +113832,7 @@
   Алексей Проскуряков (Alexey Proskuryakov),
   Alexis Deveria,
   Allan Clements,
+  Ami Fischman,
   Amos Jeffries,
   Anders Carlsson,
   André E. Veltstra,




More information about the Commit-Watchers mailing list