Fandom Developers Wiki
Advertisement

YoutubePlayer allows you to embed YouTube videos in pages.

Installation

Usage

Create a template (e.g. Template:YoutubePlayer) and add the contents of this page into it. Then you can use the template with

{{YoutubePlayer
|id = the ID of the video
|width = the width size (without -px)
|height = the height size (without -px)
|autoplay = 0 / 1 (determines if the video auto-plays or not)
|loop = 0 / 1 (determines whether or not the video replays)
|start = the start time of the video in seconds
|playlist = ID of a YouTube list
}}

Configuration

It is possible to restrict usage of the autoplay option completely. What you need is to insert the following code in your MediaWiki:Common.js:

window.YoutubePlayerDisableAutoplay = true;

Examples

{{YoutubePlayer
|id = HqURNITAxcE
|width = 640
|height = 480
}}

gives...

Template:YoutubePlayer

{{YoutubePlayer
|id = sn1Jj-HDqO0
|playlist = PLaKZBiOLJSdaU_ylcfHjgZ_QjDt3ukV3F
}}

gives...

Template:YoutubePlayer

Advertisement