EmbedVideo Extension

From Jimbojw.com

Jump to: navigation, search

The EmbedVideo Extension is a MediaWiki extension which adds a parser function called #ev for embedding flash based video content into wiki pages.

It is released under The MIT License.

Note: If you're looking for a German version of this page, check out Hilfe:Video on krefeldwiki.de



This extension requires:

  • MediaWiki 1.6.x, 1.9.x, 1.10.x or higher
  • PHP 4.x, 5.x or higher


  1. Download EmbedVideo, and be sure to rename the downloaded file to EmbedVideo.php.
  2. Drop this script in $IP/extensions
    Note: $IP is your MediaWiki install dir.
  3. Enable the extension by adding this line to your LocalSettings.php:


Note: All instructions in this section are strictly Optional

The following global variables may be specified in LocalSettings.php AFTER the require_once() call to activate the extension.

Global Purpose Default
$wgEmbedVideoMinWidth Defines the minimum acceptable width in pixels for embedded videos. 100
$wgEmbedVideoMaxWidth Defines the maximum acceptable width in pixels for embedded videos. 1024

You may also configure the list of supported video sharing sites in your LocalSettings.php file. To remove an entry, add the following (AFTER the require_once() that enables the extension):


Where 'service' is the name of the video sharing service to remove.

Alternatively, to add a new video service, add the following:

$wgEmbedVideoServiceList['service'] = array(
    'url' => 'http://somedomain.com/path/to/video/$1'

Where '$1' is intended be replaced by the id as provided in the parser function parameters.

Determining what the URL should be is left as an exercise for the reader.


Once installed, you (or editors of your wiki) may begin embedding videos into any article.

The parser extension expects to be called in either of the following ways:

  • {{#ev:service|id}} -or-
  • {{#ev:service|id|width}}


  • service is the name of a video sharing service.
  • id is the id of the video to include
  • width (optional) is the width in pixels of the viewing area (height will be determined automatically)






Google Video









Got something to say?

Leave a comment
Sorry, comments are disabled.

or, read what others have said ...