I’ve got a long .m4v video file (~ 1 hour) on my server,but I want to show a video on my site (HTML-5 ) that only show’s subsections of it (e.g minutes 3 -> 5 followed by minutes 19 -> 20). So the video my users see is only 5 mins long.
Is anyone aware of any current HTML-5 video players or clever tricks that would support this use case ? I guess the functionality I want is like the quicktime reference file, but in HTML5 -video so that if my users play the video through they only see the ‘sub-sections’ and nothing in between.
Any help appreciated.
You can use Media Fragments URIs to tell the browser to only request a portion of the video file from the server.
For example, to retrieve this video from 10 seconds to 20 seconds, set your video source(s) using a url like this:
As usual, this will not work in Internet Explorer.
You’ll still need to stitch the multiple video fragments together in order. You can put an “ended” event listener on each one to queue up the next video, or you can use a library like popcorn.sequence