Play YouTube videos right on a page
The Composite.Media.YouTube allows you to add and play YouTube videos on web pages. All you need to specify is the ID of the YouTube video you want to play. Optionally, you can control the width and height of the embedded YouTube video player and enable or disable the full-screen playing option.
How to implement Composite.Media.YouTube
- Install the package.
- Edit a page where you want to add a YouTube video.
- Insert the
Composite.Media.YouTube function into the page.
<f:function name="Composite.Media.YouTube" xmlns:f="http://www.composite.net/ns/function/1.0"> <f:param name="VideoId" value="64Nl7Mhnugo" /> <f:param name="Height" value="344" /> <f:param name="Width" value="425" /> <f:param name="FullScreen" value="True" /> </f:function>
- Specify the ID of the YouTube video you want to play on the page in the Video Id parameter (like 64Nl7Mhnugo in http://www.youtube.com/watch?v=64Nl7Mhnugo.)
- Optionally, set the width and height of the YouTube video player on the page in the corresponding parameters of the function.
- If necessary, disable the Full Screen button on the YouTube video player in the Fullscreen parameter, which is enabled by default.
Requirements
Composite C1 version 2.0 or later