Extension:EmbedVideo

The EmbedVideo Extension is a MediaWiki extension which adds a parser function called #ev for embedding video clips from over 24 popular video sharing services in multiple languages and countries.


 * Project Homepage: Documentation at Github
 * Source Code: Source code at Github
 * Bugs:issues at Github
 * Licensing: EmbedVideo is released under The MIT License.

Notice: As of the 2.x series the EmbedVideo extension has a new maintainer and an entirely rewritten code base. It retains backwards compatibility with EmbedVideo 1.0 and EmbedVideoPlus.

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

#ev - Classic Parser Tag


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

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

- Tag Hook
Videos can easily be embedded with the tag hook. The ID/URL goes as the input between the tags and parameters can be added as the tag arguments.

https://www.youtube.com/watch?v=pSsYTj9kCHE

Examples


For example, a video from YouTube use the 'youtube' service selector enter either the raw ID: Or the full URL:



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

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. https://www.youtube.com/watch?v=pSsYTj9kCHE&start=76

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

v2.2.7
* https://github.com/Alexia/mediawiki-embedvideo/pull/35
 * Compatible with Mediawiki 1.24.0+

v2.2.6

 * NicoNico Video ID fixes; will work with new ID formats.

v2.2.5

 * XSS flaws reported by Mischanix.

v2.2.4

 * Fix Bing to work with their new URLs.
 * Remove MSN as their new video service does not support embedding.
 * Standardize Tudou support per their wiki.

v2.2.3

 * Added support for Youku and Tudou.

v2.2.2

 * Updated regular expression replacement pattern for Twitch URLs. Old Twitch embed URLs do not automatically redirect.

v2.2.1

 * Fixed E_NOTICE being thrown for undefined array indexes.
 * Back ported some PHP 5.3 compatibility changes. Please note that future releases of EmbedVideo may not support PHP 5.3 as it is an outdated version.  Upgrading to PHP 5.4 at a minimum is recommended.

v2.2.0

 * Fixed a bug with alignment that would cause the left align to not work similar to how Mediawiki handles images and other media.
 * New parser tag better suited for templates; #evt.
 * New HTML like tag format that can take parameters.

v2.1

 * The width parameter was changed to dimensions. See parameter documentation above.
 * New container parameter to use a standard Mediawiki thumb frame or default to a generic container.
 * The description parameter no longer forces the thumb frame to be used.
 * Added support for Archive.org, Blip.tv, CollegeHumor, Gfycat, Nico Nico Video, TED Talks, and Vine.
 * Ability to center align embeds.
 * CSS resource module.

v2.0

 * URLs from the player pages that contain the raw video ID can now be used as the ID parameter.
 * Validation of the raw IDs is improved.
 * Code base rewritten to have a VideoService class for future extensibility.
 * Switched to HTML5 iframes wherever possible for embeds.
 * All services overhauled to be up to date and working.
 * The 'auto' and 'center' alignment values were removed as they were not working. They are planned to be implement properly in the future.

Developer Notes
The major benefit of using a parser function as the injection mechanism for video clips (as opposed to an extension tag) is that parser functions can utilize template parameters (of the form  ).

For example, say you found yourself making a lot of YouTube videos in thumbnail size, right-aligned like an image. You might make a template called  which could contain this:

And then call it like this:

Reporting Bugs
There is an issue tracker set up on the Github project page.

Contributing
Bug reports, feature requests, and patches are always welcome. New contributors can be added to the Github project if there is sufficient interest.

Weblinks

 * Gamepedia Help Wiki / French / German