Dash Media Player Install Guide for Drupal CMS

Step 1: Install Drupal
The Dash Media Player requires a full installation of the Drupal content management system. If you already have Drupal installed then skip this step.
Step 2: Get Dash Media Player Module
- Download and install the Dash Media Player Module
- Download the Dash Media Player (yes these are two separate things)
- Download the latest version here
- Create a new directory called ‘player’ in your Drupal root directory and place these files in that directory:
- dashPlayer.swf
- skins (whole directory)
- config (whole directory)
- Once you have created the directory ‘player’ with the above files in it, you will need to go into your Drupal Administration Menu under “Dash Media Player” and set the correct file path for theDash Media Player SWF file. For our example, we would provide http://www.{yoursite}/player/dashPlayer.swf, and of course, replace {yoursite} with the URL of your domain. This will then set up the Dash Media Player API to point correctly to your player.
Step 3: Required Modules
Download and install these modules:
- Services
In the Administer >> Modules Menu in Drupal enable the Services Module as well as the following which comes with Services:
- Node Service
- System Service
- Views Service
- Voting Service (if you want to have voting within the Dash Media Player)
- AMFPHP Module
- Before you install the AMFPHP Module, you will need to get the AMFPHP services gateway. Get it here Sourceforge.net
- Extract all of the code from the AMFPHP services directory and place it inside the AMFPHP Module folder, the path should look like modules/amfphp/amfphp
- Once you have done all that, you are ready to install the AMFPHP Module onto your site.
Note: If you want Drupal to work with languages outside of English. In the amfphp.module file find:
$gateway->setCharsetHandler(“utf8_decode”, “ISO-8859-1”, “ISO-8859-1”);And delete it or comment it out: To comment it out simply add // in front. This should be around line 49 or 50.
- CCK (Allows custom field creation for different content types)
- There are two seperate ways to set up how your videos are uploaded, one way or the other may fit your needs best, some sites may even benifit from using both methods. See Step 6: Creating a Video Content Type for more detail on these two options:
- FlashVideo (Automatically generates a thumbnail for the video upload)
- File Field + Image Field (User manually uploads the video file AND the preview thumbnail)
- Views (required if you want to have a playlist)
- Voting API (required for voting capabilities)
- Content Template (Allows the setup of templates that apply across content types)
- FiveStar (shows ranking of videos outside of the player)
- Statistics and Upload Modules which come with a standard Drupal Install
Step 4: Configuration
- You first need to set all of the permissions to allow you to set up the Dash Media Player in Drupal, if you are User 1 you can skip this step, but it’s a good idea to set it up for any admin users you may have. These are the permissions needed:
- access services
- load any node data
- load own node data
- access all views
- Next go into the Services section of the Administration menu
- There you will need to create an API Key:
- Click on the Keys tab
- Then you need to click on the link that says Create Key.
- There you will need to create an API Key:
- Where is asks for Domain, simply enter your domain following these rules below.

- Now that you have an API key created, you will need to set up the configuration XML file for your player to associate with your Drupal Site.
- In the /player/config directory you will find the dashconfig.xml file. Open this file and paste in your API Key between the
tags. - Complete the form filling in the repsctive tags and when you are finished it should look something like this:

- In the /player/config directory you will find the dashconfig.xml file. Open this file and paste in your API Key between the
Step 5: Enabling the View Counter (optional)
- Make sure you have the Statistics Module enabled (Administer >> Modules)
- In the Administer >> Access Log Settings menu check the radio button to enable Count Content Views
Step 6: Creating a Video Content Type
There are two different options for setting up the Video content type, that apply to different styles of sites. It is also possible to set up both options on the same site if you have a need for uploads for different user types driven by Drupal permissions.
The first option is to have the Flashvideo Module installed and use that to automatically create a video upload field as well as a preview thumbnail, as a still from a set time in the video. The Flashvideo Module also has the power to convert any user uploaded video types into flash readable video that will work with the Dash Media Player. The first option requires the cron to be run in order for the actualy video content to be created since the Flashvideo Module converts any uploaded file into a flash readable media file.
The second option is to use CCK, File Field, and Image Field to add custom fields where users will upload the video file and preview thumbnail image separately.
Option 1:
- Go to Administer >> Content Types to create a Video content type labeled “Video” for the name and “video” for the type. Under Workflow Settings make sure Attachments are enabled.
- Go to Administer >> FlashVideo Settings, find your node type in the list given, and then click on the link that says FlashVideo Settings for this node type, then:
- Check Enable the FlashVideo for this Node Type
- Check Require the FlashVideo for this node type.
- Click on FFMPEG Settings, make sure all information is correct... You may need to change the “mp3” in ffmpeg command to “libmp3lame”
- Now go to Create Content >> Video and make a page (there should be a place to upload video). It’s a good idea to create a couple of video test pages, but not necessary.
- Once you have created some content, go to Administer >> Reports >> Status Report and Run cron manually.
Option 2:
- There are a couple of extra modules that are not required but give a bit more control of how the image is created and sized on the site.
Using these modules in combination with the Image Field Module will allow for images to automatically be resized to allow for standardized image sizes as well as allowing different image sizes of an image to be used for different purposes. (A thumbnail for the playlist and larger preview in the player itself for example)
Make sure you go to Administer >> Modules and enable the Dash Media Player integration for the Image Cache Module to allow for these modules to work better together.
- Go to Administer >> Content Types to create a Video content type labeled “Video” for the name and “video” for the type. Under Workflow Settings make sure Attachments are enabled.
- Click on manage fields under the video content type that you just created.
- Add a new field with the Label “Video Upload” and under field_ enter “video_upload” (make sure not to have any capitalized letters or spaces in this field)
- For type of data to store select “File” and make sure “File Upload” is selected for the Form element to edit the data.
- Click Save.
- After clicking save, you should be taken to a screen with options for that field. Here you need to make sure to add the extensions for video so that they can be uploaded using this field.
Be aware that not all of the video formats are supported by the Dash Media Player, only flash supported formats will work. The most common are .flv .mov .mp4 and .m4v
You can also remove the .txt as users will not be using this field to upload text documents.
- Clicking the “Required” check-box is recommended if you only plan on having one type of video that will be connected through this content type (see the Youtube Support guide for adding 3rd party, embedded video, as an option)
- Click “Save field settings” Then click and drag the arrow to the left of your new field to a different position (higher up on the page) if you would like. Don’t forget to click save again after moving the field’s position.
- If you are using Image Cache, go to Administer >> Image Cache and create preset sizes for both a Video Thumbnail (100x100 works well here) as well as a Video Preview (make this larger as it will be displayed in the main screen of the player itself (640x640 works well)
- Now create a field for a thumbnail to be attached with the video.
- Follow the same as you did to make the Video Upload field, but change the Label to “Video Thumbnail” and the field to “video_thumb”
- Select “File” for Type of Data to Store, and this time change the Form element to edit the data from “File Upload” to “Image”
- If you have Image Cache and the Dash Media Player Image Cache Module installed you should see 2 drop down boxes to select which Image Cache preset will be displayed by both the node preview and the thumbnail.
- The rest of the default settings for this field have already been set up by the Image Field Module so you can simply save the field.
Step 7: Setting up the Content Template
- Go to Administer >> Content Templates and select “edit template” for the Video Content type.
- Under “Teaser” click Affect teaser output and remove any code that may be displayed in the Teaser Template text area.
- Enter this code:
<?php
$params [‘node’] = $node->nid; print dashplayer_get_player( $params );
?> - Save and go back to any video node and if all is setup right, you should have the Dash Media Player show up and play the video.
Step 8: Creating content
- Now go to Create Content >> Video and make a page (there should be a place to upload video). It’s a good idea to create a couple of video test pages, but not necessary.
- Once you have created some content, go to Administer >> Reports >> Status Report and Run cron manually.
Step 9: Setting up the playlist in the Views Module
- Go to Administer >> Views and click Add to create a new view.
- Give your view a name, for our case, it would be "videos"
- Give it a short description, give it a tag name if you like, then go down and press the Next button.
- Now go over and press the + button next to the Filters section.
- Add a filter for Node: Type then select your node type that you are using for videos from the checkboxes.
- Next add a filter for Node: Published.
- Next, let’s add a Field, press the + next to the Field section.
- Add a Field for Node: Title
- Don’t forget to save your View.
Step 10: Embedding the Code
Enter this code into the body where you want the player to display.
<?php
$params[‘playlist’] = ‘videos’; print dashplayer_get_player($params);
?>One option is to go to Create Content >> Page
- Give the page a name and paste the code into the body
Do not forget to change your input format to PHP code
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
Now you should be able to see your Dash Media Player and it should play your videos.



