Javascript mp3 player only working with some browsers

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

05-Jan-12 16:16
I'm using a javascript/jquery based mp3 player called jplayer (jplayer.org) to stream mp3s. It works fine on Chrome and Safari only.

At first the player wouldn't even show up at all on other browsers but then I noticed a display:none line in the CSS that I removed which caused the buttons to show up but not the song name. When you press the next track button a song title will appear but nothing will play. I copied the player from mumfordandsons.com (where they have the display:none in their CSS and their player works fine on all browsers..?)

I created a stripped down page with nothing but my player on it for ease of troubleshooting which can be viewed here: www.thehordeandtheharem.com/test/

Any help you can give me would be greatly appreciated as I've been stuck on this for days, thanks!
11-Jan-12 17:18
@jackfiasco: Just a hunch, but I'd start by taking out that document.write() in your head section and including jQuery in the usual way instead. document.write() can cause all sorts of problems and is best avoided.

The display: none was probably there for a reason, eg so that the JS can switch between the HTML5 or Flash player as appropriate. If the player doesn't show up then you probably have a JS problem.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated