0

I have a webradio that like to put on the site. I used the following code that works in Internet Explorer, but not in Windows 8.1 or the 64-bit MAC (iPad, iPhone ...)

<object classid = "clsid: 6BF52A52-394a-11D3-B153-00C04F79FAA6" width = "280" height = "100"     codebase = "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf. cab # version = 5,1,52,701 "> 
<param name="url" value="http://109.71.41.230:8658"> 
<param name="autostart" value="false"> 
<embed type="application/x-mplayer2" width="280" height="100" src="http://109.71.41.230:8658">     </ embed> 
</ object> 

The following code works on Mac, but also does not work on Windows 8.1 64-bit:

<audio preload="auto" autoplay controls="controls" src="http://109.71.41.230:8658/;"> 
</ audio> 

I visited your page: Embedding Windows Media Player for all browsers but also did not work.

There is some code that works on all browser's? thank you

Community
  • 1
  • 1
dmachado
  • 11
  • 1

1 Answers1

0

There is no such 'Code that works on all browsers' ;-) You have to check what capabilities the browser has. For example flash or html5 audio or both etc. and deliver the proper code. That's not the easy way.

But you could use http://jplayer.org instead.

It's a HTML5 Player with Flash fallback and does all the checks for major browsers for you. It supports: Windows: Chrome, Firefox, Internet Explorer, Safari, Opera Windows (legacy): IE6, IE7, IE8, IE9, IE10, IE11 OSX: Safari, Firefox, Chrome, Opera iOS: Mobile Safari: iPad, iPhone, iPod Touch Android: Android 2.3 Browser Blackberry: OS 7 Phone Browser, PlayBook Browser

and those media types: HTML5: mp3, mp4 (AAC/H.264), ogg (Vorbis/Theora), webm (Vorbis/VP8), wav Flash: mp3, mp4 (AAC/H.264), rtmp, flv