Modèle:Audio

De Scoutopedia

Description

This is the Audio template. It uses the Html5mediaAudio widget but helps to avoid adding the full URL of a locally uploaded file to the widget's "url" parameter by rather just specifying the name of the file via the "name" parameter. It is however still possible to use the "url" parameter for an externally hosted file.

Usage

externally hosted file

{{Audio
 |url=https://upload.wikimedia.org/wikipedia/commons/5/5c/Wagner_Tristan_opening_(orchestral).ogg
}}

locally hosted file

{{Audio
 |name=Ventfrais.mp3
}}

Example

externally hosted file

locally hosted file

Code

Just copy the following code to a page called "Template:Audio" on your wiki.

<includeonly>{{#widget:Html5mediaAudio |url={{#if: {{{url|}}} |{{{url|}}} |{{filepath: {{{name|}}} }} }} }}</includeonly>