Welcome to my corner of the web. Here you'll find my ramblings about faith, church, drupal, Geeks and God (my podcast), and my other unrelated interests.

While you can subscribe to all posts here from the Subscribe link on the right, there are two other main feeds. There is the drupal and other technology feed along with the faith and church feed.

Getting The Audio Module Flash Player To Display

Posted on: Wed, 2007-04-18 22:27 | By: matt | In:

Drupals audio module is a powerful asset for media and podcasting sites. But, as someone who has used the audio module for a podcast, I've learned that making it do what I want and getting the flash players to look the way I want to is often not obvious. So, over the next couple weeks I am going to blog about some lessons I've learned to hopefully make it easier for others.

Let's start with that situation where you have the audio module installed, you created an audio node with an mp3 file, and your flash player isn't displaying. What you get is a link that says Click to play.

If you uploaded an mp3 or wav file you should expect to see the 1pixelout player. By default, if you haven't changed the player in admin >> settings >> audio >> player the 1pixelout player should display. If it's not displaying the technical reason is because the audio module isn't able to detect the file type. Since it doesn't know the type it doesn't show the player. The audio module finds the file type in the node object at $node->audio_fileinfo['fileformat'].

The fix for this is to use getID3. First, download getID3 and put the decompressed getID3 directory in the audio modules directory. Note: Be sure to delete the demo directory in the getID3 directory for security reasons. Then go to admin >> build >> modules and enable the Audio getID3 module.

Now, any audio node that's created will have a value for $node->audio_fileinfo['fileformat'] which will make the flash player show for mp3 and wav files. Any previously created audio nodes will not have the flash player until they are updated.

Note: The 1pixelout flash player is the default flash player as of April 17, 2007. Before that it was the XSPF flash player.

Comments

#1 Thanks, I was always

Thanks, I was always wondering how you do that.. ;)Your geekieness always amazes/scares me. I love you.

#2 just wait

Thanks sweetheart. Just wait until we are married and living together. You'll get to experience this every day ;-).

#3 Also make sure

the sample rate is 44,100 hz or 22,050 hz or it will not siplay and play

#4 good call

Very good call. I didn't think of that because that's how I always end up doing it.

The rates are a multiple of 11.025khz so it could be 11.025, 22.050 or 44.100 khz.

#5 Done That

Okay, I've done all that already, but some of my mp3's still have that "click here to play" deal. The ones that work are stereo while the one that won't is mono.

Is this an issue with the creation of the mp3?

#6 Other Comment

Okay, I should have read all the comments ... there's my issue.

#7 modifying audio module's look

Hi, how do I get rid of the line where is reads by and posted on, right below where !title and !artist shows.
And second, how do I add the Artist field right below the Title as a separate field

Thanks!

#8 Custom Theme

The display of those nodes is entirely custom. We don't use the content variable. We pull the parts of the node object we want and display those in the node-audio.tpl.php file.

#9 emedeoneria

shoodoethilia
Bpef
TertellireMug
http://avkisjk.com - abbd