Help:Widgets/YouTube

From UBC Wiki

This widget allows you to add YouTube video player to your wiki page.

To embed YouTube videos, follow the step below


How to add YouTube (in visual editor mode)

  1. On visual editor, go to insert>Template to go to the add template option
    Go to insert>template to go to the add template option
  2. Under Add a template, type in YouTube, then click on Add template.
    Under Add a template, type in YouTube, then click on Add template.
  3. Add parameters (see the bullet point below) for YouTube Video, then click on Insert. If you want to add a playlist, click on Add more information. :
    • YouTube id - video id (from the URL)
    • playlist - playlist name (starts with PL) - first clip is played (id is ignored).
    • height and width define view dimensions, 420x350 is default
      Adding parameter for the YouTube video
  4. After you have inserted the template, there will be a code that says "Start Widget.."appearing on Visual Editor. Ignore this and then click on save page.
    a code that says "Start Widget"
  5. Done! You have now added a video on the page.
    end result of the embed video

Sample results


Playlist


Adding YouTube in text editor mode

This widget allows you to add YouTube video player to your wiki page.

To embed YouTube videos, use the following code:

{{#widget:YouTube|id=DWef69ItVrU|height=360|width=480}}

Parameters

  • id - video id (from the URL)
  • playlist - playlist name (starts with PL) - first clip is played (id is ignored)
  • height and width define view dimensions, 420x350 is default

Sample results


Playlist
 {{#widget:YouTube|playlist=PL6FD8256CD24CFF1F}}