user2192572
user2192572

Reputation: 3

SoundCloud Custom Player not working in FireFox?

I'm making a website for this guy and he wanted me to install the SoundCloud Custom Player. I did this and have found that it works fine in Chrome but it is not working in FireFox (I'm on 19.0.2) or IE (9.0.14).

Here's the site: http://kimmy.lareveuse.net/

Is there something on my end that I'm doing incorrectly?

I got all of the install information here: http://developers.soundcloud.com/docs/custom-player#

The examples from that page DO work on FireFox but I noticed that their examples use a previous version of jquery (1.4.2) where as we are now on version 1.9.0

Any suggestions would be appreciated.

Upvotes: 0

Views: 1405

Answers (2)

Paul Isaac
Paul Isaac

Reputation: 1

There's an official "jQuery Migrate" plugin available here:

http://code.jquery.com/jquery-migrate-1.1.0.min.js

You'd add that after your normal jQuery reference. (Generally frowned upon, but a quick fix.) Failing that, you need to get rid of SC's $.browser.msie usage and add your own IE detection.

Upvotes: 0

PeeHaa
PeeHaa

Reputation: 72652

Always open you console when trying to debug JavaScript. For starters you have an error when trying to load some CSS file:

GET http://kimmy.lareveuse.net/css/sc-player.css 404 (Not Found)

This will not solve the problem, but you should fix it either way.

Secondly you should set the encoding of document:

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol.

Again this also will not solve the problem. The actual problem is that you are using jQuery 1.9 in which .browser is removed. And this is used by the custom soundcloud player to sniff the browser:

TypeError: $.browser is undefined [Break On This Error] if ($.browser.msie) {

So either you need to upgrade the soundcloud player script (if a newer version is available) or you need to downgrade your jQuery version.

Upvotes: 1

Related Questions