MP3 player on your Drupal 7 website
There is a very neat solution for integrating MP3 files with your Drupal 7 website. In this post I will explain how to make mp3 files directly streaming on your website without users having to download the file.
- First you need to download and install the Soundmanager2 module.
- Download the Javascript library for Soundmanager2.
- Unpack the Soundmanager2 zip file and place it on your webserver in the following directory: /sites/default/libraries/soundmanager2 (make sure you place all the files in this directory as shown in this screenshot). You can create the folders if they don't exist already.
- Before you can display MP3 files on your Drupal website you need to define the content type which will be associated with the MP3 file. In this example I will name the content type 'Song'.
- Add a filefield to this content type. I'm calling this 'MP3 File'. It's also wise to enable the description field which will be used by the MP3 player. (Make sure the MP3 extensions is an allowed extension).
- Now go to 'Manage Display' and choose 'Soundmanager 2 Page Player' for the 'MP3 File' field. You can experiment with the 'Soundmanager 2 UI 360' and 'Soundmanager 2 Inline Player' option but I find this one the most visually pleasing.
- Create a node of this content type and upload your MP3 File.
- Tadaa! Your node is now displaying an MP3 player:
Was something not clear? Let me know in the comments and I'll try to help.
Original Article: