Skip to content

ahmednuaman/vid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vid is a small and simple jQuery plugin that you can use to load in video players from your favourite video sites. 

How to use:
Here's some example code:
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
        <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="http://github.com/ahmednuaman/vid/raw/master/jquery.vid.js"></script>
    </head>
    <body>
        <div id="flash" style="width: 500px; height: 400px;"></div>
        <script type="text/javascript">
        <!--
            $(document).ready( function()
            {
                var api = $( '#flash' ).vid({
                    type    : 'youtube',
                    videoId : 'R7yfISlGLNU' 
                });
            });
        -->
        </script>
    </body>
</html>

It's that simple!

You can customise the settings, that's the hash you pass to vid():

// required
type				: 'youtube',		// String 		- defines the service, possible values are: youtube, vimeo, dailymotion, 1click2fame.
videoId			: '4wGR4-SeuJ0',	// String		- defines the unique video identifier
// optional
autoPlay		: false,			// Boolean		- defines whether to autoplay the video or not
loop				: false,			// Boolean		- defines whether to loop the video or not
hq					: true,				// Boolean		- defines whether to play the highest quality version, so HD or HQ, rather than SD
chromeless	: false				// Boolean		- defines whether to use the chromless player for youtube only
resize			: true,				// Boolean		- defines whether you want the player to resize dynamicly to its parent's size

It includes a copy of the jQuery SWFObject plugin by Jonathan Neal: http://jquery.thewikies.com/swfobject/

About

a jQuery plugin for loading video players from your favourite video sites

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published