Skip to content

Category: Web

jPlayer is My New Best Friend

I’ve been looking at alternatives to Flash for loading and playing sound files for a while now. Any iPhone user out there can tell you that they still do not support Flash even though there a lot of reports out there that Apple and Adobe are working towards an agreement. I’m somewhat impatient and want my audio clips to be as available to everyone as I can make them. Even iPhone users.

Unfortunately in my search I found no other real cross-browser solution except for Flash. I did find jPlayer though.

When developing this blog template I chose jQuery from all the other javascript frameworks out there because of its ease of use and flexibility. jPlayer is a plugin written for the jQuery javascript framework. It does use a hidden Flash file to play the music, but is controlled through javascript. Since I was already fairly familiar with jQuery, I went with this option. Also, the real beauty of jPlayer is the ability to easily style the player using HTML and CSS. Although WordPress offers some audio support, I wanted something that followed the look and feel of my site.

After incorporating jPlayer and testing it out on the iPhone, I was stunned. My mp3 files were opening and playing when I hit the play button. It appears jPlayer also detects Flash support, just like the SWFObject library. I’ve searched the site and tried to figure out the reason for this, but haven’t discovered it yet. I thought maybe it used the SWFObject library. If anyone knows, I’m curious.

So, I found a way to play my sound files over the iPhone and all is good in the kingdom. If you’re looking at ways to get your flash video or mp3 files to display on iPhone, I suggest checking out SWFObject. If you’re looking for a good customizable audio player that works with jQuery definitely visit Happyworm’s jPlayer site.

7 Comments