Dash Media Player and the Audio Module
Note: This setup is slightly different from the Dash Audio Player set up. The Audio Module brings in the ability to use different types of audio files, and uses the getid3() library to automatically generate the metadata for your audio uploads. Make sure to check out both setup options to determine which one best fits your needs.
Prep
If you already have set up the Dash Media Player to play Audio files there are a few things that you will need to do before starting this guide.
- If you have already created a view with the name “audio” you will need to delete this view since the Audio Module will automatically create a view with the same name and they will conflict with each other.
Removing this view will also delete the playlist from the Dash Media Player. If you don’t want to lose this view, clone the view then rename it something like Dash Audio.
- The same applies if you have previously created a content type called “Audio.” If there is already a content type with that name, the Audio Module will not be able to create it’s unique Audio type automatically and will not work correctly. You can quickly fix this problem by changing the name again to something like Dash Audio.
Changing the name of the view and content type will allow you to have two separate playlists for your Dash Media Player.
Step 1: Install Dash Media Player
You may have this installed on your site to service your video needs already, and if that’s the case skip this step. If you don’t have it installed check out the Dash Media Player Quick Start Guide for Drupal CMS.
Step 2: Audio Module
- Download and install the Audio Module.
- Download and install the getID3() Module.
- This module requires the getID3() PHP library. Download version 1.7.9(the latest stable version at the time of this writing)
- Extract the directory and rename it as “getid3” (it’s a good idea to copy it first then rename the copy) and place the entire directory in the getid3 folder under where you keep your modules. The path should look like this sites/all/modules/getid3/getid3
- The Audio Module also requires the Token and CCK Modules.
- Go to Administer >> Modules and enable the following:
- Under Audio:
- Audio
- Audio Attach
- Audio getID3
- Audio Images
- Audio Playlist
- Under Dash Media Player:
- Dash Media Player: Audio
- Under Other:
- getID3()
- Under Audio:
- Go to Administer >> getID3() and make sure that the path is correct.
- Go to Administer >> Audio settings. Here you can set up how your audio nodes will be created. Add more file extensions if needed, change how the node title and teaser format are created, and select downloadable by default to be true or false. Don’t forget to save your settings.
- Next, click on the Metadata tags bar at the top of the form and select what information will be displayed, automatically generated, browsable, and written to the file, etc.
You should now have an “Audio” link in your navigation menu, as well as a few audio views that are automatically created.
Step 3: Adding the Code
- Copy and paste this code into the body where you want the player to display.
<?php
$params[‘playlist’] = ‘audio’; $params[‘autostart’] = ‘true’; print dashplayer_get_player($params);
?>One option is to go to Create Content >> Page
- a. Give the page a name and paste the code into the body
Another common option is to paste the code into a block. This allows you to easily move the player around your site.
- Go to Administer >> Blocks and make a new block by clicking Add block
- Name the block and paste the code into the body.
Do not forget to change your input format to PHP code
Note: If you don’t want the music to start playing automatically on the page load simply change:
$params[‘autostart’] = ‘true’to
$params[‘autostart’] = ‘false’



