OggPlayer/pl

OggPlayers is a script that makes playing Ogg files easier. It has two features:
 * Removes the button and initializes all players for Ogg files (both audio and video) added through wiki-syntax
 * Allows you to add a compact one-button audio player for things like sound bites.

Note: it doesn't fix the lack of support for Ogg format in some browsers (like IE, Edge or Safari).

Players
By default, all files in the Ogg format that are inserted like images produce a button that initializes the player and a thumbnail if it's a video. The script removes the necessity to click the button for the player to show up (and in some cases rearrange the layout). It also removes the link "".

Player auto-initialization is optional and can be turned off if you only want the button described below. To do that just add this to your MediaWiki:Common.js: var oggPlayerButtonOnly = false;

Button
This allows you to make a single button that after clicking will play a sound and stop and can be stopped by clicking again. If multiple buttons appear on the same page, clicking one will stop the playthrough of any other button.

There are multiple ways to insert it, whichever works best. // a player [[Media:Some sound.ogg]] // a media link  // a direct link
 * Note: You can use  in the   parameter.
 * Note: Only files hosted on Fandom and Wikimedia servers with .ogg, .oga or .ogv extension.

Styling
If you want to change the appearance of the button you can use both inline style and css classes:
 * – all buttons have it ofc
 * – when the button is currently playing the sound
 * – when there's no sound for the button or the browser doesn't support Ogg format.

Other notes

 * You can add  class to make the button play sound when the parent element is clicked (like the whole table cell).
 * Everything inside the  will be removed.

i18n
Add i18n via translations editor.