Skip to content
Browse files

[gow] (2) Introduce video.startTime to return the earliest possible p…

…osition.

git-svn-id: http://svn.whatwg.org/webapps@3035 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 7d79b33 commit 36234a5a906ac93eae54f00925b892bd38c8ae99 @Hixie Hixie committed
Showing with 52 additions and 12 deletions.
  1. +25 −6 index
  2. +27 −6 source
View
31 index
@@ -19757,8 +19757,8 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
readonly attribute unsigned short <a href=#dom-media-networkstate title=dom-media-networkState>networkState</a>;
attribute boolean <a href=#dom-media-autobuffer title=dom-media-autobuffer>autobuffer</a>;
<!--v3BUF readonly attribute float <span title="dom-media-bufferingRate">bufferingRate</span>;
- readonly attribute boolean <span title="dom-media-bufferingThrottled">bufferingThrottled</span>;-->
- readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-media-buffered title=dom-media-buffered>buffered</a>;
+ readonly attribute boolean <span title="dom-media-bufferingThrottled">bufferingThrottled</span>;
+--> readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-media-buffered title=dom-media-buffered>buffered</a>;
void <a href=#dom-media-load title=dom-media-load>load</a>();
DOMString <a href=#dom-navigator-canplaytype title=dom-navigator-canPlayType>canPlayType</a>(in DOMString type);
@@ -19773,6 +19773,7 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
// playback state
attribute float <a href=#dom-media-currenttime title=dom-media-currentTime>currentTime</a>;
+ readonly attribute float <a href=#dom-media-starttime title=dom-media-startTime>startTime</a>;
readonly attribute float <a href=#dom-media-duration title=dom-media-duration>duration</a>;
readonly attribute boolean <a href=#dom-media-paused title=dom-media-paused>paused</a>;
attribute float <a href=#dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate>defaultPlaybackRate</a>;
@@ -20890,12 +20891,24 @@ interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {
<p>Can be set, to seek to the given time.<p>
<p>Will throw an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if there
- is no selected <span>media resources</span>. Will throw an
+ is no selected <a href=#media-resource>media resource</a>. Will throw an
<code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception if the given time is not
within the ranges to which the user agent can seek.</p>
</dd>
+ <dt><var title="">media</var> . <code title=dom-media-startTime><a href=#dom-media-starttime>startTime</a></code></dt>
+
+ <dd>
+
+ <p>Returns the <a href=#earliest-possible-position>earliest possible position</a>, in
+ seconds. This is the time for the start of the current clip. It
+ might not be zero if the clip's timeline is not zero-based, or if
+ the resource is a streaming resource (in which case it gives the
+ earliest time that the user agent is able to seek back to).</p>
+
+ </dd>
+
</dl><div class=impl>
<p>The <dfn id=dom-media-duration title=dom-media-duration><code>duration</code></dfn>
@@ -20945,10 +20958,16 @@ interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {
position</dfn> is the earliest position in the stream or resource
that the user agent can ever obtain again.</p>
- <p>When the <a href=#earliest-possible-position>earliest possible position</a> changes, if the
- <a href=#current-playback-position>current playback position</a> is before the
+ <p>The <dfn id=dom-media-starttime title=dom-media-startTime><code>startTime</code></dfn>
+ attribute must, on getting, return the <a href=#earliest-possible-position>earliest possible
+ position</a>, expressed in seconds.</p>
+
+ <p>When the <a href=#earliest-possible-position>earliest possible position</a> changes, then:
+ if the <a href=#current-playback-position>current playback position</a> is before the
<a href=#earliest-possible-position>earliest possible position</a>, the user agent must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest possible
- position</a>.</p>
+ position</a>; otherwise, if the user agent has not fired a <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> event at the element in
+ the past 15 to 250ms, then 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> called <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the element.</p>
</div>
View
33 source
@@ -21273,8 +21273,8 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {
readonly attribute unsigned short <span title="dom-media-networkState">networkState</span>;
attribute boolean <span title="dom-media-autobuffer">autobuffer</span>;
<!--v3BUF readonly attribute float <span title="dom-media-bufferingRate">bufferingRate</span>;
- readonly attribute boolean <span title="dom-media-bufferingThrottled">bufferingThrottled</span>;-->
- readonly attribute <span>TimeRanges</span> <span title="dom-media-buffered">buffered</span>;
+ readonly attribute boolean <span title="dom-media-bufferingThrottled">bufferingThrottled</span>;
+--> readonly attribute <span>TimeRanges</span> <span title="dom-media-buffered">buffered</span>;
void <span title="dom-media-load">load</span>();
DOMString <span title="dom-navigator-canPlayType">canPlayType</span>(in DOMString type);
@@ -21289,6 +21289,7 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {
// playback state
attribute float <span title="dom-media-currentTime">currentTime</span>;
+ readonly attribute float <span title="dom-media-startTime">startTime</span>;
readonly attribute float <span title="dom-media-duration">duration</span>;
readonly attribute boolean <span title="dom-media-paused">paused</span>;
attribute float <span title="dom-media-defaultPlaybackRate">defaultPlaybackRate</span>;
@@ -22642,12 +22643,24 @@ interface <dfn>CueRangeCallback</dfn> {
<p>Can be set, to seek to the given time.<p>
<p>Will throw an <code>INVALID_STATE_ERR</code> exception if there
- is no selected <span>media resources</span>. Will throw an
+ is no selected <span>media resource</span>. Will throw an
<code>INDEX_SIZE_ERR</code> exception if the given time is not
within the ranges to which the user agent can seek.</p>
</dd>
+ <dt><var title="">media</var> . <code title="dom-media-startTime">startTime</code></dt>
+
+ <dd>
+
+ <p>Returns the <span>earliest possible position</span>, in
+ seconds. This is the time for the start of the current clip. It
+ might not be zero if the clip's timeline is not zero-based, or if
+ the resource is a streaming resource (in which case it gives the
+ earliest time that the user agent is able to seek back to).</p>
+
+ </dd>
+
</dl>
<div class="impl">
@@ -22705,11 +22718,19 @@ interface <dfn>CueRangeCallback</dfn> {
position</dfn> is the earliest position in the stream or resource
that the user agent can ever obtain again.</p>
- <p>When the <span>earliest possible position</span> changes, if the
- <span>current playback position</span> is before the
+ <p>The <dfn title="dom-media-startTime"><code>startTime</code></dfn>
+ attribute must, on getting, return the <span>earliest possible
+ position</span>, expressed in seconds.</p>
+
+ <p>When the <span>earliest possible position</span> changes, then:
+ if the <span>current playback position</span> is before the
<span>earliest possible position</span>, the user agent must <span
title="dom-media-seek">seek</span> to the <span>earliest possible
- position</span>.</p>
+ position</span>; otherwise, if the user agent has not fired a <code
+ title="event-timeupdate">timeupdate</code> event at the element in
+ the past 15 to 250ms, then the user agent must <span>queue a
+ task</span> to <span>fire a simple event</span> called <code
+ title="event-timeupdate">timeupdate</code> at the element.</p>
</div>

0 comments on commit 36234a5

Please sign in to comment.
Something went wrong with that request. Please try again.