模板:Sound/doc

来自Terraria Wiki
跳到导航 跳到搜索

This template is used to provide a button to play a sound effect, with the default HTML audio player as a fallback if JavaScript is disabled. This is intended primarily for short sound effects, as there is no seeking ability.

The template was ported from the Minecraft Wiki.

Usage

{{ sound | <description> | <audio file> | track = <music track> | iconfirst = y/yes }}

First unnamed parameter

Displayed wikitext. A speaker icon is displayed next to it indicating the playing status. Clicking the text (if not a link) or icon will stop any other sounds, and start/stop this sound.

Second unnamed parameter

Name of the audio file, without [[File:.

track

Alternative, simplified method for music tracks. The first and second unnamed parameters are not needed in this case.

iconfirst

Display the speaker icon before the description text.

Examples

Code Result
{{sound|Play my mixtape 🔥|Music-Overworld Day.mp3}} Play my mixtape 🔥
{{sound||Terraria.wav}}
The {{sound|[[Media:Roar 0.wav|characteristic roar]]|Roar 0.wav|iconfirst=y}} announces the spawn of a [[boss]]. The characteristic roar announces the spawn of a boss.
{{sound|track=Underground Corruption}} {{sound|track=Underground Corruption (Otherworldly)}} 地下腐化之地 地下腐化之地(异界版)