HTML5 video - playing only a portion of a video

calle picture calle · Apr 16, 2012 · Viewed 11.9k times · Source

Is there some straightforward technique to play only a certain part of a HTML5 video? For example in a 30 second clip I would like to play only the part 5-20 sec. Additionally the rest of the video should not be accessible from the UI at all (meaning the video timeline should only show the 5-20 sec part).

I've been going through some HTML5 video players but none of them seem to be supporting this kind of functionality. If anyone knows a (good) way to implement this feature please give me a hint.

Thanks in advance!

Answer

Ian Devlin picture Ian Devlin · Apr 10, 2013

Even though this question has already been marked as answered, here's something that may interest you and anyone else who stumbles across here: Specifying playback range.

It's part of the Media Fragment API and currently works in the latest versions of Firefox, Chrome and Safari 6+.