Help:Embedding Video files

From BelieveTheSign
Jump to navigation Jump to search

The EmbedVideo parser function expects to be called in any of the following ways:

#ev - Classic parser tag

  • {{#ev:service|id}}
  • {{#ev:service|id|dimensions}}
  • {{#ev:service|id|dimensions|alignment}}
  • {{#ev:service|id|dimensions|alignment|description}}
  • {{#ev:service|id|dimensions|alignment|description|container}}
  • {{#ev:service|id|dimensions|alignment|description|container|urlargs}}
  • {{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize}}
  • {{#ev:service|id|dimensions|alignment|description|container|urlargs|autoresize|valignment}}

However, if needed optional arguments may be left blank by not putting anything between the pipes:

  • {{#ev:service|id|||description}}

#evt - Parser tag for templates

The #evt parser tag allows for key=value pairs which allows for easier templating and readability.


#evu - Parser tag for URLs

The #evu parser tag is like the #evt tag, but its first parameter is a URL that will be parsed to determine the service automatically.


Tag hook

Videos can easily be embedded with the <embedvideo></embedvideo> tag hook. The ID/URL goes as the input between the tags and parameters can be added as the tag arguments.

<embedvideo service="youtube"></embedvideo>

Alternativly, you can also use the service id as the tag (assuming another extension isn't already using this tag).


Attributes for parser tags

Attribute Description
service="(See Supported Services below.)" Required: yes
The video service to call.
id="[id|url]" Required: yes
The raw ID of the video or URL from the player page.
dimensions="[WIDTH|WIDTHxHEIGHT|xHEIGHT]" Required: no, Default: 640
Dimensions in pixels to size the embed container. The standard format is width x height where either can be omitted, but the x must proceed height to indicate it as the height.
Examples: 480, 480x320, x320. If the height is not provided it will be calculated automatically from the width and service default ratio.
Some services such as Gfycat do not have standard heights and should be specified for each embed. $wgEmbedVideoDefaultWidth can be set in LocalSettings.php to override the default width.
alignment="[left|center|right|inline]" Required: no, Default: none
Align the placement of the video either to the left, centered, or to the right. Inline will allow multiple videos to display side by side without forced line breaks.
description="[wiki text]" Required: no, Default: none
Display a description under the embed container.
container="[frame]" Required: no, Default: none
Specifies the container type to use for the embed.
frame: Wrap the video player in a Mediawiki thumbnail box.
urlargs="modestbranding=1&version=3" Required: no, Default: none
Allows extra URL arguments to be appended to the generated embed URL. This is useful for obscure options only supported on one service.
autoresize="false" Required: no, Default: true
Automatically resize videos when their size will cause them to break outside of their container element.
valignment="[top|middle|bottom|baseline]" Required: no, Default: none
Align the vertical placement of the video either to the top, middle, bottom, or baseline of the parent element. Using this parameter forces the alignment parameter to be inline.


For example, a video from YouTube uses the 'youtube' service selector. You can specify either the raw ID:


Or specify the full URL:


To display the same video as a right aligned large thumbnail with a description:

{{#ev:youtube||1000|right|Let eet GO|frame}}

For YouTube to have the video start at a specific time code utilize the urlargs(URL arguments) parameter. Take the rest of the URL arguments from the custom URL and place them into the urlargs. Please note that not all video services support extra URL arguments or may have different keys for their URL arguments.

URL arguments can be used to chop up a video and loop it:

Supported services

As of version 2.x, EmbedVideo supports embedding video content from the following services:

Site Service name(s) ID example URL example(s) Notes Videos archiveorg electricsheep-flock-244-80000-6
Bambuser bambuser 5262334 Broadcasts
bambuser_channel Channels
Beam beam RocketBear Streams
Bing bing 31ncp9r7l blip Blip requires the full URL to the video page and does not accept the raw ID.
C3TV mediacccde 32c3-7305-quantum_cryptography
CollegeHumor collegehumor 6875289
Dailymotion dailymotion x1adiiw_archer-waking-up-as-h-jon-benjamin_shortfilms
Daum TVPot tvpot - Obtain the URL or ID from the share menu URL. s9011HdLzYwpLwBodQzCHRB
Div Share divshare
Edutopia Edutopia content moved to YouTube. Please use the YouTube service selector below.
FunnyOrDie funnyordie c61fb67ac9
Gfycat gfycat BruisedSilentAntarcticfurseal
Hitbox hitbox Washuu
JW Player jwplayer cr5d8nbu-8ZpoNmmJ
Kickstarter kickstarter elanlee/exploding-kittens
Metacafe metacafe 11404579
Nico Nico Video nico sm24394325
RuTube rutube b698163ccb67498db74d50cb0f22e556
SoundCloud soundcloud SoundCloud requires the full URL.
TeacherTube teachertube 370511
TED Talks ted bruce_aylward_humanity_vs_ebola_the_winning_strategies_in_a_terrifying_war
Tubi TV tubitv 318409
Tudou tudou mfQXfumwiew
Twitch twitch twitchplayspokemon Live Streams
twitchvod Archived Videos on Demand
Videomaten videomaten
Vimeo vimeo 105035718
Vine vine h2B7WMtuX2t
Yahoo Screen yahoo katy-perry-dances-sharks-2015-024409668
YouTube youtube pSsYTj9kCHE Single videos
youtubeplaylist Playlists
youtubevideolist,CW_PbErQ_c8 Video list
Youku youku XODc3NDgzMTY4