Git Product home page Git Product logo

kit_html5_video_player's Introduction

kit_html5_video_player

Kit HTML5 Video Player is a powerful tool to provide HTML5 Videos on your website. The player does not provide a flash fallback.

Requirements

Kit HTML5 Video uses a set of external libraries. For basic usage kit requires jquery. For optimal skin optic you should also include bootstrap and fontawesome vector icons. But these libs are not required. If you don't want to use either bootstrap or fontawesome vector icons, you have to add icons to the player yourself manually.

Usage

Include Javascript and CSS files:

	<script src="js/player.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="css/player.basic.css"/>
	<link rel="stylesheet" type="text/css" href="css/player.skins.css"/>

Init player from sources

	<div id="player">
		<video controls>
			<source ...>
		</video>
	</div>

	<script type="text/javascript">
		var p = $('#player').kit_HTML5VideoPlayer({
			// optional
			width 		: 600,
			height 		: 480,
			skin			: 'yt'
		});

		var api = p.kit_HTML5VideoPlayer();
	</script>

Clip Object

Single Source

	var clipObject = {
		title : 'My Clip', // optional
		src : 'video.webm',
		type : 'video/webm'
	};

Multiple Sources

	var clipObject = {
		sources : [
			{ type : 'video/webm', src : 'video.webm' },
			{ type : 'video/mp4', src : 'video.mp4' },
			{ type : 'video/ogg', src : 'video.ogg' }
		]
	};

Multiple Sources with resolutions

	var clipObject = {
		sources : [
			{ type : 'video/webm', resolutions : { '240p' : 'video-240p.webm', '360p' : 'video-360p.webm' } },
			{ type : 'video/mp4', resolutions : { '240p' : 'video-240p.mp4', '360p' : 'video-360p.mp4' }  },
			{ type : 'video/ogg', resolutions : { '240p' : 'video-240p.ogg', '360p' : 'video-360p.ogg' }  }
		]
	};

Playlist

	<div id="player"><video controls></video></div>

	<script type="text/javascript">
		var p = $('#player').kit_HTML5VideoPlayer({
			playlist = [
				clipObject1, ..., clipObjectN
			]
		});

		var api = p.kit_HTML5VideoPlayer();
	</script>

Config Options

	skin				Skin of the player
		yt|default|flat|bubbles
	
	

kit_html5_video_player's People

Contributors

roberthartung avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

kit_html5_video_player's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.