This time I will share jQuery Plugin and tutorial about Responsive Youtube Video Gallery Plugin – jQuery YouRam, hope it will help you in programming stack.
YouRam is a jQuery plugin that helps you generate a responsive Youtube video gallery from any Youtube Channel, User, or Playlist.
Clicking any video thumbnail in the gallery will open and play the Youtube video in a lightbox popup. Users are also able to switch between videos by clicking the prev/next buttons.
The plugin also provides a cache functionality to avoid multiple API calls to YouTube. Cached data is saved inside the plugin folder on your server.
More Features:
- Limits the max number of videos to display.
- Provides a Load More button to load more videos into the gallery.
- Custom loading indicator & loading text.
- Custom Play icon and hover animation.
How to use it:
1. Download and upload the following folders to the server.
2. Load the necessary JavaScript and CSS files in the document.
1 |
< link href = "/path/to/css/youram.min.css" rel = "stylesheet" /> |
2 |
< script src = "/path/to/cdn/jquery.min.js" ></ script > |
3 |
< script src = "/path/to/js/youram.min.js" ></ script > |
3. Create a container element to hold the Youtube video gallery.
1 |
< div id = "yram" class = "youram" ></ div > |
4. Call the function on the container, insert your Youtube API Key, and define an array of YouTube playlist or channel links separated by comma.
04 |
apiKey: "API KEY HERE" , |
5. Determine the max number of videos to display on page load.
6. Determine the display mode: popup, inline, or link.
4 |
videoDisplayMode: "inline" |
7. Customize the appearance of the Youtube video gallery.
03 |
themeColor: "rgb(235, 229, 52)" , |
04 |
youramBackgroundColor: "#dadbdb" , |
05 |
itemBackgroundColor: "#fbfbfb" , |
06 |
titleColor: "#383838" , |
07 |
controlsTextColor: "#383838" , |
08 |
titleFontFamily: "B612" , |
09 |
generalFontFamily: "B612" , |
11 |
titleFontWeight: "bold" , |
12 |
controlsFontSize: "1" , |
13 |
controlsFontWeight: "bold" , |
8. Customize the responsive breakpoints.
3 |
responsiveBreakpoints: [600,850,1050,1400] |
9. Cache options.
5 |
cacheFolderName: "cache" |
10. Hiding options.
3 |
hideLoadingMechanism: false , |
7 |
hideReloadCacheButton: false , |
11. More customization options.
04 |
loadMoreText: "<i class="fas fa-plus""></i> Load more videos..""
|