Template:Audio: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (Fixed spacing)
m (Updated documentation)
 
Line 2: Line 2:
Insert a link to an audio file with compact play/pause controls suitable for inline usage.
Insert a link to an audio file with compact play/pause controls suitable for inline usage.


This is a simple wrapper around [https://github.com/NilsEnevoldsen/AudioButton AudioButton].
This is a simple wrapper for the [https://github.com/NilsEnevoldsen/AudioButton AudioButton] extension.


== Examples ==
{{Template demo
{{Template demo
| style = table
| style = table
Line 9: Line 10:
| <nowiki>{{Audio|Which_worg_upchucked_you.wav|Cutting Words}}</nowiki>
| <nowiki>{{Audio|Which_worg_upchucked_you.wav|Cutting Words}}</nowiki>
| caption 2 = Named arguments
| caption 2 = Named arguments
| <nowiki>{{Audio|Galeperniciousputrifyingpissant.wav|text=Pernicious, putrefying pissant!}}</nowiki>
| <nowiki>
{{Audio
| file = Galeperniciousputrifyingpissant.wav
| text = Pernicious, putrefying pissant!
}}
</nowiki>
| caption 3 = Normal MediaWiki embed
| <nowiki>[[File:Galeperniciousputrifyingpissant.wav]]</nowiki>
}}
}}


Line 36: Line 44:
</templatedata>}}
</templatedata>}}
[[Category: Templates]]
[[Category: Templates]]
[[Category: Link templates]]
</noinclude>
</noinclude>

Latest revision as of 02:52, 2 November 2024

Template documentation

Insert a link to an audio file with compact play/pause controls suitable for inline usage.

This is a simple wrapper for the AudioButton extension.

Examples

Example Markup Renders as
Unnamed arguments
{{Audio|Which_worg_upchucked_you.wav|Cutting Words}}
Cutting Words
Named arguments
{{Audio
| file = Galeperniciousputrifyingpissant.wav
| text = Pernicious, putrefying pissant!
}}

Pernicious, putrefying pissant!

Normal MediaWiki embed
[[File:Galeperniciousputrifyingpissant.wav]]

Template data

Embed an audio file with compact play/pause controls suitable for inline usage

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Filefile 1

Audio file to link

Filerequired
Texttext 2

Text to display with the audio file

Stringsuggested