Released under the
MIT License.
Source on Github.
Compatible with: jQuery 1.9.1+
Converts a list of Youtube links into a gallery. It displays the video player in a lightbox or just plain links if required. It can also use the colorbox or fancybox plugin to display the video players nicely.
intro
Property | Supported values | Default | Description |
---|---|---|---|
apiFallbackUrl | Fallback URL, used in conjunction with apiUrl. | ||
apiUrl | Generate youtube gallery form youtube API URL (must be json format, see API docs) | ||
assetFolder | The folder where the play button graphic is located | ||
fancybox | If you are using the fancybox plugin, you can pass in the fancybox settings. See fancybox for more info. | ||
forceLegacyIE | false | By default the plugin will not try to use a lightbox for IE6 or IE7 due to lack of support in Youtube. | |
iframeTemplate | <iframe title="Youtube video player" id="youtube-videogallery-iframe" style="height:{options.innerHeight}px;width:{options.innerWidth}px;" frameborder="0" src="about:blank"></iframe> | ||
innerHeight | 344 | Height of the video, if using a lightbox | |
innerWidth | 425 | Width of the video, if using a lightbox | |
newWindow | (opens in a new window) | Message to append to links if not using a lightbox | |
playButton | play-button-red@40.png | The name of the play button image which should be in the folder specified by the assetFolder propertie | |
plugin | colorbox fancybox self none |
self |
The default setting creates a basic lightbox. Use colorbox to create a nice, customisable lightbox. Set to 'none' to preserve the direct links to youtube. |
style | compact | Different display options. | |
title | default full none |
default | Determines how the titles are shown, set to 'none' to hide, 'full' display the full title. Default truncates title to one line line |
videos | Array of objects containing id and title. Use if you want to create a gallery from JSON | ||
urlEmbed | http://www.youtube.com/embed/$id | Link to youtube embed url | |
urlImg | http://img.youtube.com/vi/$id/0.jpg | Link used to create the gallery image. To use bespoke images put them on your server and use the video ID in the URL. | |
urlLink | http://www.youtube.com/watch?v=$id | Default youtube link url |