Categories
Internet JavaScript WordPress

HTML5 Playlist video player

UPDATE: WordPress Plugin available!

Super fast player and playlist player using native HTML5 video player and jQuery. This will work also in WordPress. Uses browser local storage.

Features

  • Resume video from last position
  • On window close, stores position
  • Create playlist video from a HTML5 list or JS array
  • Resume on last played video
  • Autoplay next video on video end
  • Mark video as played
  • Start playing from video via url parameter using ?start_video=ID_VIDEO

Demo

Usage

Add HTML video tag and a List with id = bvideo_playlist :

<video controls="" src="http://s3.amazonaws.com/akamai.netstorage/HD_downloads/earth_night_rotate_1080.mov" ></video>

<ol id="bvideo_playlist">
    <li><a href="http://s3.amazonaws.com/akamai.netstorage/HD_downloads/earth_night_rotate_1080.mov">Animation: Rotating Earth at Night</a><span style="float:right;"><a target="_blank" download="" href="http://s3.amazonaws.com/akamai.netstorage/HD_downloads/earth_night_rotate_1080.mov">55.00 MB</a></span></li>
    <li><a href="http://s3.amazonaws.com/akamai.netstorage/HD_downloads/rbsp_launch_1080p.mp4">Radiation Belt Storm Probes Launch</a></li>
    <li><a href="http://s3.amazonaws.com/akamai.netstorage/HD_downloads/curiosity_lands.mov">Dropping in on Mars in High-Res</a><span style="float:right;"><a target="_blank" download="" href="http://s3.amazonaws.com/akamai.netstorage/HD_downloads/curiosity_lands.mov">105.00 MB</a></span></li>
    <li><a href="http://s3.amazonaws.com/akamai.netstorage/HD_downloads/GRAIL_launch_1080.mov">GRAIL Launches on Mission to Moon</a></li>
    <li><a href="http://s3.amazonaws.com/akamai.netstorage/HD_downloads/HLV_Launch_anim.mov">Space Launch System Animation</a></li>
</ol>

You can also add in your HTML/JS file a playlist array and will create your list magically, the size field it’s optional:

var video_playlist = [
	{
		"name": "Animation: Rotating Earth at Night",
		"link": "http://s3.amazonaws.com/akamai.netstorage/HD_downloads/earth_night_rotate_1080.mov",
		"size": 55000000,
	},
	{
		"name": "Radiation Belt Storm Probes Launch",
		"link": "http://s3.amazonaws.com/akamai.netstorage/HD_downloads/rbsp_launch_1080p.mp4",
		"size": 475000000,
	},
	{
		"name": "Dropping in on Mars in High-Res",
		"link": "http://s3.amazonaws.com/akamai.netstorage/HD_downloads/curiosity_lands.mov",
        "size": 105000000,
	},
    {
        "name": "GRAIL Launches on Mission to Moon",
        "link": "http://s3.amazonaws.com/akamai.netstorage/HD_downloads/GRAIL_launch_1080.mov",
        "size": 1113000000,
    },
    {
        "name": "Space Launch System Animation",
        "link": "http://s3.amazonaws.com/akamai.netstorage/HD_downloads/HLV_Launch_anim.mov",
        "size": 642570000,
    },

];

Source code and Download