More actions
mNo edit summary |
(allow wav files too) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{ | <includeonly>{{#if:{{{1|}}}| | ||
{{# | {{#switch:{{lc:{{#explode:{{{1}}}|.|-1}}}} | ||
|ogg|wav= | |||
<span class="audio-button">[[Media:{{{ | <span class="audio-button">[[Media:{{{1}}}|{{{caption|Play}}}]]</span> | ||
|{{#sub:{{file:{{{ | |#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 == | ||
<pre><nowiki> | <pre><nowiki> | ||
{{Audio | {{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| | {{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|Caption}} | ||
</nowiki></pre> | </nowiki></pre> | ||
{{Audio| | Test: | ||
{{Audio| | |||
{{Audio| | {{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg}} | ||
{{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 002.ogg}} | |||
{{Audio|BlazBlue Central Fiction Jubei Battle Voice VS Celica 003.ogg}} | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
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: