Skip to content
Permalink
Browse files

[giow] (0) Change startDate to a method to avoid the confusion of it …

…being mutable.

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

git-svn-id: http://svn.whatwg.org/webapps@8113 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 31, 2013
1 parent 8cf34ad commit 3df350e8c8403467dcdc570a2ee2649a8f44305c
Showing with 18 additions and 18 deletions.
  1. +6 −6 complete.html
  2. +6 −6 index
  3. +6 −6 source
attribute double <a href=#dom-media-currenttime title=dom-media-currentTime>currentTime</a>;
void <a href=#dom-media-fastseek title=dom-media-fastSeek>fastSeek</a>(double time);
readonly attribute unrestricted double <a href=#dom-media-duration title=dom-media-duration>duration</a>;
readonly attribute <span>Date</span> <a href=#dom-media-startdate title=dom-media-startDate>startDate</a>;
<span>Date</span> <a href=#dom-media-getstartdate title=dom-media-getStartDate>getStartDate</a>();
readonly attribute boolean <a href=#dom-media-paused title=dom-media-paused>paused</a>;
attribute double <a href=#dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate>defaultPlaybackRate</a>;
attribute double <a href=#dom-media-playbackrate title=dom-media-playbackRate>playbackRate</a>;
resource">media resource's</a> format.) If the <a href=#media-resource>media resource</a> specifies an
explicit start time <em>and date</em>, then that time and date should be considered the zero point
in the <a href=#media-timeline>media timeline</a>; the <a href=#timeline-offset>timeline offset</a> will be the time and date,
exposed using the <code title=dom-media-startDate><a href=#dom-media-startdate>startDate</a></code> attribute.</p>
exposed using the <code title=dom-media-getStartDate><a href=#dom-media-getstartdate>getStartDate()</a></code> method.</p>

<p>If the <a href=#media-resource>media resource</a> has a discontinuous timeline, the user agent must extend the
timeline used at the start of the resource across the entire resource, so that the <a href=#media-timeline>media
<p>Consider a stream from a TV broadcaster, which begins streaming on a sunny Friday afternoon in
October, and always sends connecting user agents the media data on the same media timeline, with
its zero time set to the start of this stream. Months later, user agents connecting to this
stream will find that the first frame they receive has a time with millions of seconds. The <code title=dom-media-startDate><a href=#dom-media-startdate>startDate</a></code> attribute would always return the date that the
stream will find that the first frame they receive has a time with millions of seconds. The <code title=dom-media-getStartDate><a href=#dom-media-getstartdate>getStartDate()</a></code> method would always return the date that the
broadcast started; this would allow controllers to display real times in their scrubber (e.g.
"2:30pm") rather than a time relative to when the broadcast began ("8 months, 4 hours, 12
minutes, and 23 seconds").</p>
UTC to 2010-02-12 14:35:00 UTC, it would expose this with a <a href=#media-timeline>media timeline</a> starting
at 0s and extending to 3,600s (one hour). Assuming the streaming server disconnected at the end
of the second clip, the <code title=dom-media-duration><a href=#dom-media-duration>duration</a></code> attribute would then
return 3,600. The <code title=dom-media-startDate><a href=#dom-media-startdate>startDate</a></code> attribute would return a
return 3,600. The <code title=dom-media-getStartDate><a href=#dom-media-getstartdate>getStartDate()</a></code> method would return a
<code>Date</code> object with a time corresponding to 2010-03-20 23:15:00 UTC. However, if a
different user agent connected five minutes later, <em>it</em> would (presumably) receive
fragments covering timestamps 2010-03-20 23:20:00 UTC to 2010-03-21 00:05:00 UTC and 2010-02-12
14:25:00 UTC to 2010-02-12 14:35:00 UTC, and would expose this with a <a href=#media-timeline>media timeline</a>
starting at 0s and extending to 3,300s (fifty five minutes). In this case, the <code title=dom-media-startDate><a href=#dom-media-startdate>startDate</a></code> attribute would return a <code>Date</code> object
starting at 0s and extending to 3,300s (fifty five minutes). In this case, the <code title=dom-media-getStartDate><a href=#dom-media-getstartdate>getStartDate()</a></code> method would return a <code>Date</code> object
with a time corresponding to 2010-03-20 23:20:00 UTC.</p>

<p>In both of these examples, the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute
<a href=#media-timeline>media timeline</a>, known as the <dfn id=timeline-offset>timeline offset</dfn>. Initially, the
<a href=#timeline-offset>timeline offset</a> must be set to Not-a-Number (NaN).</p>

<p>The <dfn id=dom-media-startdate title=dom-media-startDate><code>startDate</code></dfn> attribute must return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a> representing the current
<p>The <dfn id=dom-media-getstartdate title=dom-media-getStartDate><code>getStartDate()</code></dfn> method must return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a> representing the current
<a href=#timeline-offset>timeline offset</a>.</p>

</div>
12 index
attribute double <a href=#dom-media-currenttime title=dom-media-currentTime>currentTime</a>;
void <a href=#dom-media-fastseek title=dom-media-fastSeek>fastSeek</a>(double time);
readonly attribute unrestricted double <a href=#dom-media-duration title=dom-media-duration>duration</a>;
readonly attribute <span>Date</span> <a href=#dom-media-startdate title=dom-media-startDate>startDate</a>;
<span>Date</span> <a href=#dom-media-getstartdate title=dom-media-getStartDate>getStartDate</a>();
readonly attribute boolean <a href=#dom-media-paused title=dom-media-paused>paused</a>;
attribute double <a href=#dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate>defaultPlaybackRate</a>;
attribute double <a href=#dom-media-playbackrate title=dom-media-playbackRate>playbackRate</a>;
resource">media resource's</a> format.) If the <a href=#media-resource>media resource</a> specifies an
explicit start time <em>and date</em>, then that time and date should be considered the zero point
in the <a href=#media-timeline>media timeline</a>; the <a href=#timeline-offset>timeline offset</a> will be the time and date,
exposed using the <code title=dom-media-startDate><a href=#dom-media-startdate>startDate</a></code> attribute.</p>
exposed using the <code title=dom-media-getStartDate><a href=#dom-media-getstartdate>getStartDate()</a></code> method.</p>

<p>If the <a href=#media-resource>media resource</a> has a discontinuous timeline, the user agent must extend the
timeline used at the start of the resource across the entire resource, so that the <a href=#media-timeline>media
<p>Consider a stream from a TV broadcaster, which begins streaming on a sunny Friday afternoon in
October, and always sends connecting user agents the media data on the same media timeline, with
its zero time set to the start of this stream. Months later, user agents connecting to this
stream will find that the first frame they receive has a time with millions of seconds. The <code title=dom-media-startDate><a href=#dom-media-startdate>startDate</a></code> attribute would always return the date that the
stream will find that the first frame they receive has a time with millions of seconds. The <code title=dom-media-getStartDate><a href=#dom-media-getstartdate>getStartDate()</a></code> method would always return the date that the
broadcast started; this would allow controllers to display real times in their scrubber (e.g.
"2:30pm") rather than a time relative to when the broadcast began ("8 months, 4 hours, 12
minutes, and 23 seconds").</p>
UTC to 2010-02-12 14:35:00 UTC, it would expose this with a <a href=#media-timeline>media timeline</a> starting
at 0s and extending to 3,600s (one hour). Assuming the streaming server disconnected at the end
of the second clip, the <code title=dom-media-duration><a href=#dom-media-duration>duration</a></code> attribute would then
return 3,600. The <code title=dom-media-startDate><a href=#dom-media-startdate>startDate</a></code> attribute would return a
return 3,600. The <code title=dom-media-getStartDate><a href=#dom-media-getstartdate>getStartDate()</a></code> method would return a
<code>Date</code> object with a time corresponding to 2010-03-20 23:15:00 UTC. However, if a
different user agent connected five minutes later, <em>it</em> would (presumably) receive
fragments covering timestamps 2010-03-20 23:20:00 UTC to 2010-03-21 00:05:00 UTC and 2010-02-12
14:25:00 UTC to 2010-02-12 14:35:00 UTC, and would expose this with a <a href=#media-timeline>media timeline</a>
starting at 0s and extending to 3,300s (fifty five minutes). In this case, the <code title=dom-media-startDate><a href=#dom-media-startdate>startDate</a></code> attribute would return a <code>Date</code> object
starting at 0s and extending to 3,300s (fifty five minutes). In this case, the <code title=dom-media-getStartDate><a href=#dom-media-getstartdate>getStartDate()</a></code> method would return a <code>Date</code> object
with a time corresponding to 2010-03-20 23:20:00 UTC.</p>

<p>In both of these examples, the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute
<a href=#media-timeline>media timeline</a>, known as the <dfn id=timeline-offset>timeline offset</dfn>. Initially, the
<a href=#timeline-offset>timeline offset</a> must be set to Not-a-Number (NaN).</p>

<p>The <dfn id=dom-media-startdate title=dom-media-startDate><code>startDate</code></dfn> attribute must return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a> representing the current
<p>The <dfn id=dom-media-getstartdate title=dom-media-getStartDate><code>getStartDate()</code></dfn> method must return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a> representing the current
<a href=#timeline-offset>timeline offset</a>.</p>

</div>
12 source
attribute double <span title="dom-media-currentTime">currentTime</span>;
void <span title="dom-media-fastSeek">fastSeek</span>(double time);
readonly attribute unrestricted double <span title="dom-media-duration">duration</span>;
readonly attribute <span>Date</span> <span title="dom-media-startDate">startDate</span>;
<span>Date</span> <span title="dom-media-getStartDate">getStartDate</span>();
readonly attribute boolean <span title="dom-media-paused">paused</span>;
attribute double <span title="dom-media-defaultPlaybackRate">defaultPlaybackRate</span>;
attribute double <span title="dom-media-playbackRate">playbackRate</span>;
resource">media resource's</span> format.) If the <span>media resource</span> specifies an
explicit start time <em>and date</em>, then that time and date should be considered the zero point
in the <span>media timeline</span>; the <span>timeline offset</span> will be the time and date,
exposed using the <code title="dom-media-startDate">startDate</code> attribute.</p>
exposed using the <code title="dom-media-getStartDate">getStartDate()</code> method.</p>

<p>If the <span>media resource</span> has a discontinuous timeline, the user agent must extend the
timeline used at the start of the resource across the entire resource, so that the <span>media
October, and always sends connecting user agents the media data on the same media timeline, with
its zero time set to the start of this stream. Months later, user agents connecting to this
stream will find that the first frame they receive has a time with millions of seconds. The <code
title="dom-media-startDate">startDate</code> attribute would always return the date that the
title="dom-media-getStartDate">getStartDate()</code> method would always return the date that the
broadcast started; this would allow controllers to display real times in their scrubber (e.g.
"2:30pm") rather than a time relative to when the broadcast began ("8 months, 4 hours, 12
minutes, and 23 seconds").</p>
UTC to 2010-02-12 14:35:00 UTC, it would expose this with a <span>media timeline</span> starting
at 0s and extending to 3,600s (one hour). Assuming the streaming server disconnected at the end
of the second clip, the <code title="dom-media-duration">duration</code> attribute would then
return 3,600. The <code title="dom-media-startDate">startDate</code> attribute would return a
return 3,600. The <code title="dom-media-getStartDate">getStartDate()</code> method would return a
<code>Date</code> object with a time corresponding to 2010-03-20 23:15:00 UTC. However, if a
different user agent connected five minutes later, <em>it</em> would (presumably) receive
fragments covering timestamps 2010-03-20 23:20:00 UTC to 2010-03-21 00:05:00 UTC and 2010-02-12
14:25:00 UTC to 2010-02-12 14:35:00 UTC, and would expose this with a <span>media timeline</span>
starting at 0s and extending to 3,300s (fifty five minutes). In this case, the <code
title="dom-media-startDate">startDate</code> attribute would return a <code>Date</code> object
title="dom-media-getStartDate">getStartDate()</code> method would return a <code>Date</code> object
with a time corresponding to 2010-03-20 23:20:00 UTC.</p>

<p>In both of these examples, the <code title="dom-media-seekable">seekable</code> attribute
<span>media timeline</span>, known as the <dfn>timeline offset</dfn>. Initially, the
<span>timeline offset</span> must be set to Not-a-Number (NaN).</p>

<p>The <dfn title="dom-media-startDate"><code>startDate</code></dfn> attribute must return <span
<p>The <dfn title="dom-media-getStartDate"><code>getStartDate()</code></dfn> method must return <span
title="create a Date object">a new <code>Date</code> object</span> representing the current
<span>timeline offset</span>.</p>

0 comments on commit 3df350e

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