More actions
(initial template) |
m (update to work with Gadget-OggPlayer) |
||
Line 1: | Line 1: | ||
<includeonly | <includeonly>{{#if:{{{file|}}}| | ||
{{#ifeq: | |||
{{lc:{{#explode:{{{file}}}|.|-1}}}}|ogg| | |||
<span class="audio-button">[[Media:{{{file}}}|{{{caption|Play}}}]]</span> | |||
|{{#sub:{{file:{{{file}}}}}|7}} | |||
}} | |||
}}</includeonly><noinclude> | |||
This template displays a play/pause button for ogg files, and a "Play" link for non-ogg audio files. | |||
== Usage == | == Usage == | ||
<pre><nowiki> | <pre><nowiki> | ||
{{Audio | {{Audio | ||
|file=filename without the File: prefix (e.g. BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg) | |file=filename without the File: prefix (e.g. BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg) | ||
|caption=optional caption | |caption=optional caption for non-ogg audio links. The link will display as "Play" by default | ||
}} | }} | ||
{{Audio|file=BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|caption=Caption}} | {{Audio|file=BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|caption=Caption}} | ||
</nowiki></pre> | </nowiki></pre> | ||
{{Audio|file=BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg}} | {{Audio|file=BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg}} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 20:28, 23 February 2020
This template displays a play/pause button for ogg files, and a "Play" link for non-ogg audio files.
Usage
{{Audio |file=filename without the File: prefix (e.g. BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg) |caption=optional caption for non-ogg audio links. The link will display as "Play" by default }} {{Audio|file=BlazBlue Central Fiction Jubei Battle Voice VS Celica 001.ogg|caption=Caption}}