[html5] r8819 - [giow] (0) Allow TimeRanges to contain 'empty' ranges (not really empty, they co [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Sep 24 15:48:16 PDT 2014
Author: ianh
Date: 2014-09-24 15:48:12 -0700 (Wed, 24 Sep 2014)
New Revision: 8819
Modified:
complete.html
index
source
Log:
[giow] (0) Allow TimeRanges to contain 'empty' ranges (not really empty, they contain one moment in time). Add some text admonishing implementations that don't allow one to seek arbitrarily when it's actually possible just inconvenient or slow.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26847
Affected topics: Video and Audio
Modified: complete.html
===================================================================
--- complete.html 2014-09-24 22:29:45 UTC (rev 8818)
+++ complete.html 2014-09-24 22:48:12 UTC (rev 8819)
@@ -23949,12 +23949,25 @@
sliding window on an infinite stream. This is the behavior seen with DVRs viewing live TV, for
instance.</p>
+ <p>User agents should adopt adopt a very liberal and optimistic view of what is seekable. User
+ agents should also buffer recent content where possible to enable seeking to be fast.</p>
+
+ <p class=example>For instance, consider a large video file served on an HTTP server without
+ support for HTTP Range requests. A browser <em>could</em> implement this by only buffering the
+ current frame and data obtained for subsequent frames, never allow seeking, except for seeking to
+ the very start by restarting the playback. However, this would be a poor implementation. A high
+ quality implementation would buffer the last few minutes of content (or more, if sufficient
+ storage space is available), allowing the user to jump back and rewatch something surprising
+ without any latency, and would in addition allow arbitrary seeking by reloading the file from the
+ start if necessary, which would be slower but still more convenient than having to literally
+ restart the video and watch it all the way through just to get to an earlier unbuffered spot.</p>
+
<p><a href=#media-resource id=seeking:media-resource-7>Media resources</a> might be internally scripted or
interactive. Thus, a <a href=#media-element id=seeking:media-element-4>media element</a> could play in a non-linear fashion. If this
happens, the user agent must act as if the algorithm for <a href=#dom-media-seek id=seeking:dom-media-seek-2>seeking</a> was used whenever the <a href=#current-playback-position id=seeking:current-playback-position-9>current playback position</a>
changes in a discontinuous fashion (so that the relevant events fire). If the <a href=#media-element id=seeking:media-element-5>media
element</a> has a <a href=#current-media-controller id=seeking:current-media-controller>current media controller</a>, then the user agent must <a href=#seek-the-media-controller id=seeking:seek-the-media-controller>seek
- the media controller</a> appropriately instead. </p>
+ the media controller</a> appropriately instead.</p>
@@ -26507,10 +26520,13 @@
<p>When a <code id=time-ranges:timeranges-2><a href=#timeranges>TimeRanges</a></code> object is said to be a <dfn id=normalised-timeranges-object>normalised <code>TimeRanges</code>
object</dfn>, the ranges it represents must obey the following criteria:</p>
- <ul><li>The start of a range must be greater than the end of all earlier ranges.<li>The start of a range must be less than the end of that same range.</ul>
+ <ul><li>The start of a range must be greater than the end of all earlier ranges.<li>The start of a range must be less than or equal to the end of that same range.</ul>
- <p>In other words, the ranges in such an object are ordered, don't overlap, aren't empty, and
- don't touch (adjacent ranges are folded into one bigger range).</p>
+ <p>In other words, the ranges in such an object are ordered, don't overlap, and don't touch
+ (adjacent ranges are folded into one bigger range). A range can be empty (referencing just a
+ single moment in time), e.g. to indicate that only one frame is currently buffered in the case
+ that the user agent has discarded the entire <a href=#media-resource id=time-ranges:media-resource>media resource</a> except for the current
+ frame, when a <a href=#media-element id=time-ranges:media-element>media element</a> is paused.</p>
<p>Ranges in a <code id=time-ranges:timeranges-3><a href=#timeranges>TimeRanges</a></code> object must be inclusive.</p>
@@ -26519,7 +26535,7 @@
zero would have a start equal to zero and an end equal to the duration of the timeline.</p>
<p>The timelines used by the objects returned by the <code id=time-ranges:dom-media-buffered><a href=#dom-media-buffered>buffered</a></code>, <code id=time-ranges:dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> and
- <code id=time-ranges:dom-media-played><a href=#dom-media-played>played</a></code> IDL attributes of <a href=#media-element id=time-ranges:media-element>media
+ <code id=time-ranges:dom-media-played><a href=#dom-media-played>played</a></code> IDL attributes of <a href=#media-element id=time-ranges:media-element-2>media
elements</a> must be that element's <a href=#media-timeline id=time-ranges:media-timeline>media timeline</a>.</p>
Modified: index
===================================================================
--- index 2014-09-24 22:29:45 UTC (rev 8818)
+++ index 2014-09-24 22:48:12 UTC (rev 8819)
@@ -23949,12 +23949,25 @@
sliding window on an infinite stream. This is the behavior seen with DVRs viewing live TV, for
instance.</p>
+ <p>User agents should adopt adopt a very liberal and optimistic view of what is seekable. User
+ agents should also buffer recent content where possible to enable seeking to be fast.</p>
+
+ <p class=example>For instance, consider a large video file served on an HTTP server without
+ support for HTTP Range requests. A browser <em>could</em> implement this by only buffering the
+ current frame and data obtained for subsequent frames, never allow seeking, except for seeking to
+ the very start by restarting the playback. However, this would be a poor implementation. A high
+ quality implementation would buffer the last few minutes of content (or more, if sufficient
+ storage space is available), allowing the user to jump back and rewatch something surprising
+ without any latency, and would in addition allow arbitrary seeking by reloading the file from the
+ start if necessary, which would be slower but still more convenient than having to literally
+ restart the video and watch it all the way through just to get to an earlier unbuffered spot.</p>
+
<p><a href=#media-resource id=seeking:media-resource-7>Media resources</a> might be internally scripted or
interactive. Thus, a <a href=#media-element id=seeking:media-element-4>media element</a> could play in a non-linear fashion. If this
happens, the user agent must act as if the algorithm for <a href=#dom-media-seek id=seeking:dom-media-seek-2>seeking</a> was used whenever the <a href=#current-playback-position id=seeking:current-playback-position-9>current playback position</a>
changes in a discontinuous fashion (so that the relevant events fire). If the <a href=#media-element id=seeking:media-element-5>media
element</a> has a <a href=#current-media-controller id=seeking:current-media-controller>current media controller</a>, then the user agent must <a href=#seek-the-media-controller id=seeking:seek-the-media-controller>seek
- the media controller</a> appropriately instead. </p>
+ the media controller</a> appropriately instead.</p>
@@ -26507,10 +26520,13 @@
<p>When a <code id=time-ranges:timeranges-2><a href=#timeranges>TimeRanges</a></code> object is said to be a <dfn id=normalised-timeranges-object>normalised <code>TimeRanges</code>
object</dfn>, the ranges it represents must obey the following criteria:</p>
- <ul><li>The start of a range must be greater than the end of all earlier ranges.<li>The start of a range must be less than the end of that same range.</ul>
+ <ul><li>The start of a range must be greater than the end of all earlier ranges.<li>The start of a range must be less than or equal to the end of that same range.</ul>
- <p>In other words, the ranges in such an object are ordered, don't overlap, aren't empty, and
- don't touch (adjacent ranges are folded into one bigger range).</p>
+ <p>In other words, the ranges in such an object are ordered, don't overlap, and don't touch
+ (adjacent ranges are folded into one bigger range). A range can be empty (referencing just a
+ single moment in time), e.g. to indicate that only one frame is currently buffered in the case
+ that the user agent has discarded the entire <a href=#media-resource id=time-ranges:media-resource>media resource</a> except for the current
+ frame, when a <a href=#media-element id=time-ranges:media-element>media element</a> is paused.</p>
<p>Ranges in a <code id=time-ranges:timeranges-3><a href=#timeranges>TimeRanges</a></code> object must be inclusive.</p>
@@ -26519,7 +26535,7 @@
zero would have a start equal to zero and an end equal to the duration of the timeline.</p>
<p>The timelines used by the objects returned by the <code id=time-ranges:dom-media-buffered><a href=#dom-media-buffered>buffered</a></code>, <code id=time-ranges:dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> and
- <code id=time-ranges:dom-media-played><a href=#dom-media-played>played</a></code> IDL attributes of <a href=#media-element id=time-ranges:media-element>media
+ <code id=time-ranges:dom-media-played><a href=#dom-media-played>played</a></code> IDL attributes of <a href=#media-element id=time-ranges:media-element-2>media
elements</a> must be that element's <a href=#media-timeline id=time-ranges:media-timeline>media timeline</a>.</p>
Modified: source
===================================================================
--- source 2014-09-24 22:29:45 UTC (rev 8818)
+++ source 2014-09-24 22:48:12 UTC (rev 8819)
@@ -30822,13 +30822,26 @@
sliding window on an infinite stream. This is the behavior seen with DVRs viewing live TV, for
instance.</p>
+ <p>User agents should adopt adopt a very liberal and optimistic view of what is seekable. User
+ agents should also buffer recent content where possible to enable seeking to be fast.</p>
+
+ <p class="example">For instance, consider a large video file served on an HTTP server without
+ support for HTTP Range requests. A browser <em>could</em> implement this by only buffering the
+ current frame and data obtained for subsequent frames, never allow seeking, except for seeking to
+ the very start by restarting the playback. However, this would be a poor implementation. A high
+ quality implementation would buffer the last few minutes of content (or more, if sufficient
+ storage space is available), allowing the user to jump back and rewatch something surprising
+ without any latency, and would in addition allow arbitrary seeking by reloading the file from the
+ start if necessary, which would be slower but still more convenient than having to literally
+ restart the video and watch it all the way through just to get to an earlier unbuffered spot.</p>
+
<p><span data-x="media resource">Media resources</span> might be internally scripted or
interactive. Thus, a <span>media element</span> could play in a non-linear fashion. If this
happens, the user agent must act as if the algorithm for <span
data-x="dom-media-seek">seeking</span> was used whenever the <span>current playback position</span>
changes in a discontinuous fashion (so that the relevant events fire). If the <span>media
element</span> has a <span>current media controller</span>, then the user agent must <span>seek
- the media controller</span> appropriately instead. </p>
+ the media controller</span> appropriately instead.</p>
</div>
@@ -34296,12 +34309,15 @@
<li>The start of a range must be greater than the end of all earlier ranges.</li>
- <li>The start of a range must be less than the end of that same range.</li>
+ <li>The start of a range must be less than or equal to the end of that same range.</li>
</ul>
- <p>In other words, the ranges in such an object are ordered, don't overlap, aren't empty, and
- don't touch (adjacent ranges are folded into one bigger range).</p>
+ <p>In other words, the ranges in such an object are ordered, don't overlap, and don't touch
+ (adjacent ranges are folded into one bigger range). A range can be empty (referencing just a
+ single moment in time), e.g. to indicate that only one frame is currently buffered in the case
+ that the user agent has discarded the entire <span>media resource</span> except for the current
+ frame, when a <span>media element</span> is paused.</p>
<p>Ranges in a <code>TimeRanges</code> object must be inclusive.</p>
More information about the Commit-Watchers
mailing list