Editing
Template:Sound
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{documentation header}} <!-- Documentation here --> This template is used to provide a button to play a sound effect, with a HTML audio player as a fallback if JS is disabled. This is intended primarily for short sound effects, as there is no seeking ability. The script and styles are provided by the sound gadget ([[MediaWiki:Gadget-sound.js]], [[MediaWiki:Gadget-sound.css]], [[MediaWiki:Gadget-sound-styles.css]]), with a fallback style in the site gadget ([[MediaWiki:Gadget-site-styles.css]]). == Usage == * {{p|1}} is the 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. * {{p|2}} is the name of the audio file to play. * {{p|3}}, {{p|4}} and additional unnamed parameters specify additional audio files and display additional speaker icons. The fallback audio player will not show for these additional files, in order to prevent infoboxes from becoming very long if JS or the sound gadget is disabled. * {{p|nofallback}} hides the fallback audio player, so the sound can only be played if JS and the sound gadget is enabled. This is good for placing the sound button inline with text, as the fallback audio player is not inline, and would otherwise be too big to include within a sentence. In this case, you should set the displayed text to be a link to the file so it can still be played by no-js users and users which disabled the sound gadget. == Examples == (Disable the [[Special:Preferences#mw-prefsection-gadgets|sound gadget]] to see how the fallback looks) ;Basic <pre>{{sound|Play my mixtape 🔥|Calm4.ogg}}</pre> {{sound|Play my mixtape 🔥|Calm4.ogg}} ;Inline with a link instead of a fallback player <pre>{{sound|'''[[Media:HerobrinePronunciation.ogg|Herobrine]]'''|HerobrinePronunciation.ogg|nofallback=1}} is the subject of a community-made [[wikipedia:Creepypasta|creepypasta]].</pre> {{sound|'''[[Media:HerobrinePronunciation.ogg|Herobrine]]'''|HerobrinePronunciation.ogg|nofallback=1}} is the subject of a community-made [[wikipedia:Creepypasta|creepypasta]]. <includeonly> <!-- Template categories/interwiki here --> [[Category:Formatting templates]] [[es:Plantilla:Sound]] [[ko:틀:Sound]] [[nl:Sjabloon:Geluid]] [[ru:Шаблон:Звук]] [[zh:模板:Sound]] </includeonly> <noinclude> <!-- Documentation categories/interwiki here --> [[es:Plantilla:Sound/doc]] [[ko:틀:Sound/doc]] [[nl:Sjabloon:Geluid/doc]] [[ru:Шаблон:Звук/док]] [[zh:模板:Sound/doc]] </noinclude>
Summary:
Please note that all contributions to Regnum Online Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
ROWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Documentation header
(
edit
)
Template:P
(
edit
)
Template:Sound
(
edit
)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information