Embed Media Files

From BC$ MobileTV Wiki
Jump to: navigation, search

Images

These will likely be the most common form of media file embedded into this wiki. We urge you to include images, diagrams, snapshots and system design overviews where possible to help readers quickly understand your ideas with a visual representation.

Images can easily be added by clicking on the image tab in the editor toolbar or by using the following markup:
[[Image:foo.jpg]]

Which would be rendered as:
Foo.jpg

In addition, we support ImageMap for more complex image embedding needs using the ImageMap wikimedia extension (which has a slightly different format than HTML ImageMaps and can be created using either the Online Image Map Editor (which supports creating either HTML, CSS or Wikimedia ImageMaps) or the unofficial Wikimedia ImageMap editor tailored specifically for the Wikimedia ImageMap extension.



Video

The EmbedVideo Extension is a MediaWiki extension which adds a parser function called #ev for embedding video clips from popular video sharing services.

Project Homepage
EmbedVideo Extension - Jimbojw.com
Licensing
EmbedVideo is released under The MIT License.


Usage

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

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

Where:

  • 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)

For example, to include the famous "evolution of dance" YouTube video, you'd enter:

{{#ev:youtube|dMH0bHeiRNg}}

And if you wanted scaled down to thumbnail size, you could use:

{{#ev:youtube|dMH0bHeiRNg|100}}

Note: See the Project Homepage for more examples.

Supported Services

As of version 0.1, EmbedVideo supports embedding video content from the following services:

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 {{{1}}}).

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 Template:Youtube_tn which could contain this:

{{#ev:youtube|{{{1}}}|{{{2|100}}}}}

And then call it like this:

{{youtube tn|someYoutubeId}}


For example, to embed Michael Wesch's Web 2.0 video that created a viral phenomenon, you would use: YouTube URL:

http://ie.youtube.com/watch?v=NLlGopyXT_g

With the embed code:

{<code>{youtube tn|NLlGopyXT_g}</code>}

Which gives the embed as follows:

Weblinks