The ScoutWiki Network server was upgraded on June 3rd, 2020. We're currently seeing some problems with long page loads on certain pages (for example Recent changes on large wikies). Sorry for the inconvenience!

Modèle:Audio

De Scoutopedia
Sauter à la navigation Sauter à la recherche

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>