[whatwg] video tag : loop for ever

Eric Carlson eric.carlson at apple.com
Thu Oct 16 08:04:41 PDT 2008


On Oct 15, 2008, at 8:31 PM, Chris Double wrote:

> On Thu, Oct 16, 2008 at 4:07 PM, Eric Carlson  
> <eric.carlson at apple.com> wrote:
>> However I also think
>> that playing just a segment of a media file will be a common use- 
>> case, so I
>> don't think we need "start" and "end" either.
>
> How would you emulate end via JavaScript in a reasonably accurate
> manner?
>

   With a cue point.

> If I have a WAV audio file and I want to start and stop
> between specific points? For example a transcript of the audio may
> provide the ability to play a particular section of the transcript.
>
   If you use a script-based controller instead of the one provided by  
the UA, you can easily limit playback to whatever portion of the file  
you want:

     SetTime: function(time) { this.elem.currentTime =  
(time<this._minTime) ? this._minTime : (time>this._maxTIme? 
this._maxTIme:time); }

   I agree that it is more work to implement a custom controller, but  
it seems a reasonable requirement given that this is likely to be a  
relatively infrequent usage pattern.

   Or do you think that people will frequently want to limit playback  
to a section of a media file?

eric



More information about the whatwg mailing list