Jump to content

Extension:EmbedSpotify

From mediawiki.org
MediaWiki extensions manual
EmbedSpotify
Release status: stable
Implementation Tag
Description Adds ‎<spotify> tag to embed spotify player
Author(s) Nessun Kim (NessunKimtalk)
Latest version 1.0.3
MediaWiki 1.25+
Database changes No
License GNU General Public License 2.0 or later
Download
‎<spotify>

The EmbedSpotify extension allows for embedding Spotify player.

Usage

[edit]

Copy the embed code from the Spotify app. The code should be something like:

<iframe src="https://open.spotify.com/embed/album/6EmLwnyjJRVgNOmOUpVhzz" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>

You need to copy the text between <iframe src="https://open.spotify.com/embed/ and " width. In the example, it is the album/6EmLwnyjJRVgNOmOUpVhzz part. It can start with album/, playlist/, or artist/ depending on the type of the song list you embed.

To embed the player, paste the copied text between <spotify> and </spotify>.

So, <spotify>album/6EmLwnyjJRVgNOmOUpVhzz</spotify> is the text you have to insert into your wiki page.

You can specify the width and height of the player in the tag's attributes such as <spotify width="300" height="200">album/6EmLwnyjJRVgNOmOUpVhzz</spotify>. If not specified, 300 and 380 will be used for width and height respectively.

Installation

[edit]
  • Download and place the file(s) in a directory called EmbedSpotify in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'EmbedSpotify' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.