- From: Chris Double <cdouble@mozilla.com>
- Date: Tue, 10 May 2011 13:52:11 +1200
- To: Media Fragment <public-media-fragment@w3.org>
I'm working on Mozilla bug 648595 to implement temporal media fragments on the HTML video and audio elements: https://bugzilla.mozilla.org/show_bug.cgi?id=648595 I have basic support working but have some questions regarding behaviour and events. This is how I've currently implemented things: 1) When a temporal fragment is given with a start time, when the loadedmetadata event on the resource is raised this is the currentTime of the resource. 2) When an end time is given I do the equivalent of calling 'pause()' on the media element. I do not raise the 'ended' event. 3) When the media is paused due to reaching the end time and then 'play()' is called, playback continues ignoring the media fragment times. 4) What do I do with 'loop'? Loop the fragment? Currently authors fake looping in the absence of the attribute support by doing something like: <video onended='video.play()'></video> This workaround won't work with fragments as I've implemented them. I don't raise the ended event. And if I did, 'play()' resumes after the fragment. There doesn't seem to be a way to detect 'hit end of fragment', or to get the fragment start/end times using the DOM without the author parsing the URL themselves. Is this likely to be a problem in practice? 5) When a user seeks, or 'currentTime' is set on the DOM object then the media fragments are ignored. Is this the right approach? Or should seeks within the fragment range not remove the fragments? Any feedback appreciated. If other implementors could comment on what they plan to do (or have already done) in this area I'd appreciate at it so I can make sure the Firefox implementation is compatible. Chris. -- http://www.bluishcoder.co.nz
Received on Tuesday, 10 May 2011 01:52:42 UTC