jquery.ui.youtube.rss
YouTube RSS jQuery Plugin
The YouTube RSS jQuery plugin makes it easy to retrieve RSS information from YouTube and display it on a page using all client side code. The plugin makes a request to YouTube by way of JSONP, by default applies a template to the retrieved content, then injects the content into the context element.
Download The Plugin
Getting Started
- Make sure you have jQuery installed and working.
- Download the plugin and place it in your scripts directory.
- Include the plugin script and start using it.
- See examples below.
Examples
Example 1
Populate an element with 5 of a user’s uploaded videos.
<div id="myUserVideos" />$(function(){
$("#myUserVideos").youtubeRss({username: "godlikemouse", limit: 5});
});Example 2
Populate all elements of a specific class with the user’s uploaded videos by tag parameters.
<div class="userVideos" youtube-username="godlikemouse" youtube-limit="5" />$(function(){
$(".userVideos").youtubeRss();
});API Options
| Option | Attribute Equivalent | Description |
|---|---|---|
| username | youtube-username | (Required) The YouTube username from which to pull the videos. |
| template | youtube-template | The template string which will be used to transform each entity. Default is $.fn.youtubeRss.defaultTemplate. |
| context | n/a – uses current $this | The content target or content element to be populated. Default is null. |
| offset | youtube-offset | The zero based starting offset to be used when retrieving videos. Default is 0. |
| limit | youtube-limit | The maximum count or limit of videos to retrieve. Default is 25. |
| orderby | youtube-orderby | The orderby field to use for sorting purposes when querying videos. Default is “updated”. |
| url | youtube-url | The url used to retrieve videos. Default is http://gdata.youtube.com/feeds/base/users/ + options.username + /uploads. |
| callback | n/a | The callback function to be use as an override when retrieving videos. Default is null, internal template engine is used. |









