Add a playlist of videos from one YouTube account to a page
This package allows you to quickly and easily add a playlist of videos from the same YouTube account to a web page.
You can choose how to play these videos: in a lightbox (recommended) or inline, specify how many videos you want on a page, select what additional information about a video to show and specify how the player will look.
It is a simple and highly-customizable client-side script that conveniently embeds on your website the videos from one of the most popular video-sharing services.
How to implement
- From the Content or Layout perspective, insert the
Composite.Media.YouTubeChannel function (
Insert >
Function), or add the following code:
<f:function name="Composite.Media.YouTubeChannel" xmlns:f="http://www.composite.net/ns/function/1.0"> <f:param name="Username" value="" /> <f:param name="FeedType" value="channel" /> <f:param name="VideosCount" value="5" /> <f:param name="PlayerWidth" value="420" /> <f:param name="PlayerHeight" value="340" /> <f:param name="ListOptions" value="Show Paging,Small Thumbnails,Show Title,Show Views Count" /> <f:param name="PlayerOptions" value="LightBox View,Allow Fullscreen,Show Related" /> </f:function>
- Specify the required parameter:
- Username: The name of the YouTube user whose videos you want as a playlist on a web page (required).
- Set up other optional parameters:
- FeedType: The source of videos: the user's 'channel' or the user's 'favorites'.
- VideosCount: The maximum number of videos in the list (5, by default). You can use "Prev" and "Next" to navigate the entire list of videos.
- PlayerWidth: The YouTube player's width (520, by default).
- PlayerHeight: The YouTube player's height (340, by default).
-
List Options: The options of the playlist. Check or uncheck these as you like:
- Show Paging: If checked (default), "Prev" and "Next" appear at the top and the bottom of the list to allow the list navigation
- ShowTitle: If checked (default), the video's title is displayed in the list.
- ShowDescription: If checked, the video's description is displayed in the list (unchecked, by default).
- ShowAuthor: If checked, the video's author is displayed in the list (unchecked, by default).
- ShowViewsCount: If checked (default), the number of video's views is displayed in the list.
-
Player Options: The options of the video player. Check or uncheck these as you like:
- LightBoxView: If checked (default), the player pops up in a lightbox; otherwise, inline.
- AutoPlay: If checked, the player auto-plays the video (unchecked, by default).
- AllowFullScreen: If checked (default), the use can watch the video fullscreen.
- ShowRelated: If checked (default), the player shows related videos after the video finishes.
Important Notes
- If the channel has videos more than set in the VideosCount parameter, the user will be able to navigate the list by clicking "Previous" and "Next" at the top and the bottom of the page provided that the Show Paging option is checked.
- When the video is open in the player (whether in a ligthbox or inline), its ID is appended to the page's URL, for example, http://www.contoso.com/MyVideos#showrlNOf6dnadk. It works the other way round: This URL opens the video in the player immediately.
- The sizes of player must be at least 360x270 or greater to show related videos if this option is selected.
Requirements
Composite C1 version 3.0 or later