Skip to content

A simple, lightweight jQuery plugin used to display videos from a Vimeo account.

License

Notifications You must be signed in to change notification settings

michael-lynch/vimy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Vimy

A simple, lightweight jQuery plugin used to display videos from a Vimeo account.

The plugin allows you to display videos independently or as a gallery.

The gallery mode displays one featured video with image thumbnails of the other videos. Clicking on the image thumbnail will replace the featured video.

Videos are displayed as simple list items allowing you to style them as you wish.

See a demo

See a demo of the gallery

##Instructions

Include jQuery and the plugin in the head or footer of your page.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    
<script src="/js/plugins/vimy.js"></script>

Create an unordered list where the videos will display.

<ul class="vimy-videos"></ul>

Initialize the plugin targeting the class, ID or element you've created.

$('.vimy-videos').vimy();

####Options

username: string
A string that defines the username of the user you wish to retrieve videos from (default: null).

gallery: boolean
A boolean that indicates whether you want the videos to display as a gallery (default: false).

imgFormat: "bg / element"
A string that defines how the gallery images should display (default: 'bg'). 'bg' sets the image as a background image on the list item, while 'element' populates the list item with an img element.

limit: integer
An integer that defines how many videos you want displayed (default: 9).

title: boolean
A boolean that indicates whether you want the title of the videos to display (default: true).

duration: boolean
A boolean that indicates whether you want the duration of the videos to display (default: true).

date: boolean
A boolean that indicates whether you want the published date of the videos to display (default: true).

description: boolean
A boolean that indicates whether you want the video description to display (default: true).

tags: boolean
A boolean that indicates whether you want the video tags to display (default: true).

success: function()
A callback function that is triggered after the request, if the request is successful.

error: function()
A callback function that is triggered after the request, if the request is fails.

#####Example:

$(function() {
	
	$('.vimy-videos').vimy({
		username: 'brad',
		gallery: true,
		imgFormat: 'element',
		limit: 5,
		success: function() {
			console.log('Videos were retrieved successfully.');
		},
		error: function() {
			console.log('There was an error.');
			$('.vimy-videos').remove();
		}
	});
		
});

About

A simple, lightweight jQuery plugin used to display videos from a Vimeo account.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published