0

I have installed soundcloud's custom HTML 5 player from github onto my site for testing purposes. I have noticed this player does not work in the firefox browser. I am getting the following error

TypeError: $.browser is undefined 


 if ($.browser.msie) {
  return '<object height="100%" width="100%" id="' + engineId + '"     classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" data="' + swf + '">'+
'<param name="movie" value="' + swf + '" />'+
   '<param name="allowscriptaccess" value="always" />'+
    '</object>';
      } else {
       return '<object height="100%" width="100%" id="' + engineId + '">'+
         '<embed allowscriptaccess="always" height="100%" width="100%" src="' + swf + '"            type="application/x-shockwave-flash" name="' + engineId + '" />'+'</object>';
    }
    }; 

Does firefox require a flash player? has anyone come across this problem before ?

NewBoy
  • 1,124
  • 2
  • 17
  • 40
  • I'm getting an error in firefox: `TypeError: $.browser is undefined http://iamnatesmithen.com/soundcloud/js/sc-player.js Line 174` – Ronnie Mar 14 '13 at 23:51

1 Answers1

1

$.browser is a deprecated jQuery property and was removed as of jQuery version 1.9 (the same version you're including on your page).

You must include a version of jQuery (< 1.9) on your page in order to use the browser property.

I think this is also a good opportunity to point out that, generally, feature detection is preferred over browser sniffing.

Community
  • 1
  • 1
Colin Brock
  • 21,267
  • 9
  • 46
  • 61