Skip to content

Author: Stefan

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

Relay for Life 2009

I’m doing Relay for Life again this year.  Relay, which is an event put on by The American Cancer Society helps fund Cancer research in hopes that some day we develop a cure for this disease.  I have a family member that is currently battling cancer and I know that I don’t want to see this to continue for him or mankind.  Please help support me by making a donation or joining our Relay Team.  You can access my page here.  I thank you in advance for your warm heart and kind consideration.

Leave a Comment

Symfony and My Network Configuration

I’ve been trying to learn the Symfony framework on my local test environment. Symfony provides a lot of the same skeletal generation of code in PHP as Rails does to Ruby, thus making the process of coding a bit faster. Plus, it creates a cleaner, easier-to-read alternative to straight PHP coding.

When trying to test my pages in the Symfony’s development environment, I get the following error: You are not allowed to access this file. Check app_dev.php for more information.

After some research I found the problem had to do with my network configuration. In my case my test server is not on my workstation, but a separate test server that I had set up on my network. The default code generated by Symfony only allows individuals to access the development environment pages from locally on the server. Since I’m accessing my web server from an outside machine on my network, Symfony will not let that fly. At least not with the code it has generated.

To remedy the situation I had to to edit my app_dev.php file underneath the web folder. The IP address of my workstation is 192.168.1.100 and I added it to the script like so:

// this check prevents access to debug front controllers that are deployed by accident to production servers.
// feel free to remove this, extend it or make something more sophisticated.
if (!in_array(@$_SERVER[‘REMOTE_ADDR’], array(‘127.0.0.1’, ‘::1’, ‘192.168.1.100’)))
{
die(‘You are not allowed to access this file. Check ‘.basename(__FILE__).’ for more information.’);
}

require_once(dirname(__FILE__).’/../config/ProjectConfiguration.class.php’);

$configuration = ProjectConfiguration::getApplicationConfiguration(‘app’, ‘dev’, true);
sfContext::createInstance($configuration)->dispatch();

4 Comments

iPhone iTems

Today, one of our student workers showed me a little-known feature with the iPhone. If you hold down the squarish “Home” button and press the power button, the iPhone will take a screenshot of your current screen. I think this could be a handy thing for blogging and works nicely with my WordPress app.

1 Comment