Published: 3 years ago

HTML5 Video Player

This is a pretty awesome jQuery video player. It has playlist functionality and lots of callbacks/options for customization.

The original design was created by the very talented kb.
media-box

Full list of features
-Built with jPlayer
-Choose which buttons are shown
-Built in playlist
-Heart/Like functionality
-Allows you to provide SD and HD versions of a video

Usage

$('selector').ttwVideoPlayer(playlist, options);

Full list of options

{
            autoplay:false,
            buttons:['playlist', 'hd', 'heart', 'settings' 'fullscreen'],
            width: "554px",
            height: "312px",
            hdPlaylist:[],
            autoHidePlaylist:true,
            autoHidePlaylistDelay:3000,
            playlistButtonCallback:function(){
                fires when the playlist button is clicked
            },
            hdButtonCallback:function(){
                fires when the HD button is clicked
            },
            heartButtonCallback:function(){
                fires when the heart button is clicked
            },
            settingsButtonCallback:function(){
                fires when the settings button is clicked
            },
            fullscreenButtonCallback:function(){
                fires when the fullscreen button is clicked
            },
            allowHeartIncrement:function(){
                //use this to determine if the heart count should be updated. If you only want to limit a user to
                //one click, you would enforce that requirement here. This function should always return true or false
                return true;
            }
            jPlayer:{}, //these are the jPlayer options. Use the structure defined on the jPlayer site, or leave off to use defaults
};

Have a Comment?

Some HTML is OK