[whatwg] <video> element feedback
kornel at osiolki.net
Fri Mar 23 13:26:11 PDT 2007
On Fri, 23 Mar 2007 10:24:30 -0000, Silvia Pfeiffer
<silviapfeiffer1 at gmail.com> wrote:
>> Let's say there's http://example.com/example.html page which contains
>> embedded video:
>> ...<video src="video.ogg">...
>> I'd like to be able to construct URL like:
>> that would cause UA to start playing the embedded video.ogg from 12:35.
> That would be hard, because how would you identify which embedded
> video or audio file on the example.html page this temporal offset is
> referring to?
I think it might work like this: when play() is called on a <video>
element, and it hasn't been called on any other video element in this
document yet, read time from location.hash and call seek().
This would work with dynamically created <video> elements and would
probably be the best choice even if there are multiple <video> elements in
If such altered behavior of play() is not unacceptable, then that might
Where "myvideo" part is interpreted as ID of element in the document (and
if there's no such element - assume document.body).
If the element is a <video>, then seek() that video.
If it isn't, then seek first <video> descendant of that element (something
like: (document.getElementById("myvideo") ||
* it doesn't require any changes to the document, so user can control
starting position in any document, even if author didn't think of such
* It's part of document's URL, not URL of the video file, so user doesn't
have to extract video file URL from the document and can still use the
page (which provides controls for the video).
part of the spec).
* it's orthogonal to server-side support for seeking
> Also, it could be interpreted by the UA only, since
> everything after "#" will not be transferred to the server.
Yes, that's intentional. It allows user to modify *any* URL without risk
of breaking it (some servers/applications may not like extra query
string). I think use of hash for this is appropriate - just like UA
scrolls HTML to given element, UA would "scroll" the video - it's just a
change of axis from Y to time :)
regards, Kornel Lesiński
More information about the whatwg