Template:YouTubePlayer

From Bejeweled Wiki
Jump to navigation Jump to search
Instructions for {{YouTubePlayer}}

How to use

{{YouTubePlayer
| VideoID = ID of video to play
| center (or c; aligns the player to the center, may not work in some cases)
| divcenter (or divc; a CSS center parameter alternative)
| autoplay = 0 or 1 (0 by default, 1 starts the video when loaded except for Flash players)
| loop = Loops a single video/PlaylistID/manual VideoID playlist
| PlaylistID = ID of the YouTube playlist you want to play
| playlist = Comma-separated list of additional VideoID/s
}}

Extended Description of the Parameters

  • VideoID (or the first parameter, if this parameter is not set)
    This is the required parameter. The VideoID can be either added by its own or by setting the VideoID parameter. Example: {{YouTubePlayer|Ex4mPl3uRl}} or {{YouTubePlayer|VideoID=Ex4mPl3uRl}}
Note: The VideoID on the video that you wanted to use can be found on the URL after ?v= and before / (if there is any).
Example: https://www.youtube.com/watch?v=Ex4mPl3uRl
  • center (or c)
    Makes the player align itself to the center via the center tag. It does not work in some cases such as using enabling this parameter into this template inside div tags which requires you to use its alternative instead.
  • divcenter (or divc)
    A center (or c) parameter alternative that utilizes the CSS center function.
  • autoplay
    Does nothing by default. Set it to 1 to enable the player to play automatically after loading itself. Advanced users can add additional embed YouTube parameters not used in this template to his/her liking after putting the values of it like "1&example=1".
Note: Flash players prevents this from happening even when enabled, requiring the user to manually play it. Although, the player still streams the player when enabled.
  • loop
    Loops a single video, PlaylistID (if this parameter is used), or a VideoID manual playlist (if the playlist parameter is used).
  • PlaylistID
    Set it to play playlists made by other YouTube users.
Notes: The PlaylistID can be found;
  1. On the video with the playlist after &list= and before & (if there is on the link).
    Example: https://www.youtube.com/watch?v=Ex4mPl3uRl&list=3X4MPL3PL4YL15T
  2. Or; on the playlist after ?list=
    Example: https://www.youtube.com/playlist?list=3X4MPL3PL4YL15T
  • playlist
    The VideoID/s you want to play after the VideoID you specified on the VideoID parameter.
    To add them, just find the VideoID/s of the videos you want to play after the video you set on the VideoID parameter and separate them with a comma (,) if you are about to add more than two of them. Make sure not put the same VideoID that you added on the VideoID parameter to the playlist parameter.
    Example: {{YouTubePlayer|Ex4mPl3uRl|playlist=sAmpl3urL2,uRl3S4mP1e}}
Note about the playlist parameters: In case both PlaylistID and playlist parameters are enabled, only PlaylistID is enabled by default.
Visit the documentation page to edit this text! (How does this work?)