Easy jQuery Video Controller Plugin

Easy jQuery Video Controller Plugin
File Size: 304KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Video Controller is a jQuery plugin that allows you to control video players and providers (like youtube, HTML5 video, etc) via external methods, without having to deal with the particularities of each video API. Ideal for your web page that have multiple types of videos embedded. The plugin currently supports 6 video players and providers: YouTube, Vimeo, HTML5, Video.js, Sublime Video and JW Player.

Basic Usage:

1. Load the jQuery video controller plugin in the head section of your page, after jQuery library.

<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="../dist/jquery.videoController.min.js"></script>

2. Embed a youtube video on your web page. For more examples, please check the example fold in the zip.

<iframe id="demo" src="PATH TO VIDEO" width="560" height="315" frameborder="0" allowfullscreen></iframe>

3. Create some links for external controllers.

<a href="#" onclick="playVideo();">Play</a> 
<a href="#" onclick="pauseVideo();">Pause</a> 
<a href="#" onclick="stopVideo();">Stop</a>
<a href="#" onclick="replaypVideo();">Replay</a>

4. Initialize the plugin.

<script type="text/javascript">
$(document).ready(function() {
$('#demo').videoController();
});

function playVideo() {
$('#demo').videoController('play');
}

function pauseVideo() {
$('#demo').videoController('pause');
}

function stopVideo() {
$('#demo').videoController('stop');
}

function replayVideo() {
$('#demo').videoController('replay');
}
</script>

Change log:

v1.3.0 (2013-11-11)

  • fix support for multiple youtube and vimeo players

This awesome jQuery plugin is developed by bqworks. For more Advanced Usages, please check the demo page or visit the official website.