Template:Media table


 * Help:Media • Having trouble playing?

Usage
The code below produces the table above.

The purpose of this template is to cleanly insert audio and video files into pages. The following parameters may be defined when using it. Replace  with a number.


 * - Can be set to either "audio" or "video". This parameter controls the icon displayed next to the file and how to handle the linked media.
 * - The name that the file is uploaded under. It should omit the "File:" prefix and file extension. So for the file at "File:Example.ogv", this parameter would be defined as "Example".
 * - File extension for the given file, with the default being "oga" for  and "ogv" for   if none is provided.
 * - This should be the file's name as it will appear on the page. For instance, if a file is uploaded at "File:Example246.ogv", but it needs to appear on the page as simply "Example",  would be defined "Example246", and   "Example". In cases where   and   would be set to identical values, only   needs to be used.
 * - A short description of the file that will appear with it on the page.
 * - HH:MM:SS format. Omit zeros please.
 * - If the file extension is written in all caps, this should be set to "on". If it is written in lowercase, it should be either left blank or set to "off". Note that a file extension containing a mix of capitals and lowercase is incompatible with this template.

Note that for all the values, additional files can be added to the list by incrementing the number in the parameter.

Code documentation
Calls for audio files and  for video files with a switch statement.