Skip to content
Whiteknight edited this page Aug 13, 2010 · 5 revisions

New sites can be added to your EmbedVideo installation by adding new records in your LocalSettings.php file for your MediaWiki installation. For more information about changing configuration variables for your installation, see the Configuration page.

New sites can be added by adding a record to the $wgEmbedVideoServiceList array. Each entry in the services array can contain several optional pieces of information depending on specific requirements of the hosting service used.

Specifying a basic host service

The most basic addition of a service is done by specifying the URL of the flash video player used by that site:

$wgEmbedVideoServiceList["MyNewSite"] = array(
"url" =. "http://MyNewSite.com/flashplayer/$1"
);

The video ID number will be substituted into the URL at the $1. So the template {{#ev:MyNewSite|ABCDEFG}} will call the URL http://MyNewSite.com/flashplayer/ABCDEFG".

Specifying sizes

You can specify default sizes for embedded videos from each service. This should be done to match the native size of videos on the service, to prevent expensive resizing operations which can decrease streaming video performance. The user can choose to override the defaults by specifying a width in the {{#ev:}} tag, but the defaults should be set correctly for the common case.

Video sizes are specified using two values: a width and a width/height ratio. Default values for these are 425px wide, and a 17/14 width/height ratio. This gives a video which is 425×350. High definition videos likely will have a 16/9 aspect ratio instead. Consult your host service to see which ratio to use. When in doubt, don’t add a ratio and it will use the default 17/14.

Specifying new default width and ratio values can be done easily:

$wgEmbedVideoServiceList["MyNewSite"] = array(
"url" =. "http://MyNewSite.com/flashplayer/$1",
"default_width" => 425,
"default_ratio" => 17/14
);

Removing Support

In some installations you may want to restrict access to some hosting sites.

Advanced Embedding

For most hosting sites, specifying a url for the flash player will suffice. For some you will need to specify a width and aspect ratio. Rarely, this is not enough to properly add support for a host, so you will need to manually specify the entire embedding code to use.

You can use the "extern" option to specify a complex embedding clause to use for embedding videos. This is a snippet of raw HTML that will be injected into the page to generate the flash player. For examples of this, see the source code in EmbedVideo.Services.php.