Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Audio: Difference between revisions

Template page
m (use anonymous parameters)
(allow wav files too)
 
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|
<includeonly>{{#if:{{{1|}}}|
{{#ifeq:
{{#switch:{{lc:{{#explode:{{{1}}}|.|-1}}}}
  {{lc:{{#explode:{{{1}}}|.|-1}}}}|ogg|
  |ogg|wav=
   <span class="audio-button">[[Media:{{{1}}}|{{{caption|Play}}}]]</span>
   <span class="audio-button">[[Media:{{{1}}}|{{{caption|Play}}}]]</span>
   |{{#sub:{{file:{{{1}}}}}|7}}
   |#default={{#sub:{{file:{{{1}}}}}|7}}
}}
}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
This template displays a play/pause button for ogg files, and a "Play" link for non-ogg audio files.
This template displays a play/pause button for ogg or wav files, and a "Play" link for non-ogg or wav audio files.


== Usage ==
== Usage ==
Line 17: Line 17:
{{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|Caption}}
{{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|Caption}}
</nowiki></pre>
</nowiki></pre>
Test:


{{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg}}
{{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg}}

Latest revision as of 20:07, 1 December 2021

This template displays a play/pause button for ogg or wav files, and a "Play" link for non-ogg or wav audio files.

Usage

{{Audio
|filename without the File: prefix (e.g. BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg)
|optional caption for non-ogg audio links. The link will display as "Play" by default
}}

{{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|Caption}}

Test:

Play Play Play