3

I've developed a web application that manages audio files. Part of the application is playing the files. I use the following code in order to play the files:

<center>
<object id=\"MediaPlayer
type=application/x-oleobject height=52 standby=Instalando Windows Media Player ...     width=358 align=absMiddle classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95>
<param name=FileName value="+path+">
</param><param name=AutoStart value=true>
</param><param name=volume value=3>
</param><param name=EnableContextMenu value=1>
</param><param name=TransparentAtStart value=\alse>
</param><param name=AnimationatStart value=false>
</param><param name=ShowControls value=true>
</param><param name=ShowDisplay value=false>
</param><param name=ShowStatusBar value=true>
</param><param name=autoSize value=false>
</param><param name=displaySize value=true>
</param></object>
</center>

This works when using IE, but won't woek with other browser, is there any other player that I could insert into my HTML code?

double-beep
  • 5,031
  • 17
  • 33
  • 41
dedalo
  • 2,541
  • 12
  • 32
  • 34

3 Answers3

1

There are Flash based MP3 players that will play almost everywhere; certainly on more platforms than Windows Media Player :)

My personal favourite is EMFF

check out this SO question for more

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • 2
    I made one: http://quickmediasolutions.com/sandbox/audio_player/ It comes with instructions too! – Nathan Osman Jan 19 '10 at 23:06
  • George: The sample rate heads-up at the bottom of your player page possibly answers a question I had earlier today: http://stackoverflow.com/questions/2095185/embedded-flash-mp3-player-slow-on-some-files-normal-on-others What a great coincidence!! – Pekka Jan 20 '10 at 00:09
  • Great! I answered your question there :) – Nathan Osman Jan 20 '10 at 00:15
  • We will test it in the next few days and I'll accept your answer if it works out. Cheers! – Pekka Jan 20 '10 at 00:18
  • Cool. Any questions or comments, feel free to contact me at admin@quickmediasolutions.com – Nathan Osman Jan 20 '10 at 01:17
0

You're using Windows Media Player, so you (or specifically your users) need to have the browser plugin for that. IE doesn't require a browser plugin, since it already blends well with most windows features (naturally). To my knowledge, the browser plugin will automatically be available for all browsers after installation. It is available from the microsoft website somewhere.

Tor Valamo
  • 33,261
  • 11
  • 73
  • 81
0

Firefox (may be others) does not support the <object> tag for that purpose, so you need to insert an <embed> tag as well:

<center>
<object id=\"MediaPlayer
type=application/x-oleobject height=52 standby=Instalando Windows Media Player ...     width=358 align=absMiddle classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95>
<param name=FileName value="+path+">
</param><param name=AutoStart value=true>
</param><param name=volume value=3>
</param><param name=EnableContextMenu value=1>
</param><param name=TransparentAtStart value=\alse>
</param><param name=AnimationatStart value=false>
</param><param name=ShowControls value=true>
</param><param name=ShowDisplay value=false>
</param><param name=ShowStatusBar value=true>
</param><param name=autoSize value>
</param><param name=displaySize value=true>
</param>

<embed src="+path+" height=30 width=358>
</object>
</center>
Mikael S
  • 5,206
  • 2
  • 23
  • 21
  • While this is technically the most correct answer, it's still Windows Media Player, and still doesn't work outside Windows. – Pekka Jan 19 '10 at 23:23
  • 2
    It does. I use mplayerplug-in in Firefox and Chrome under Linux. Firefox just chose the correct player after what file to play. – Mikael S Jan 19 '10 at 23:58
  • Interesting, didn't know that. – Pekka Jan 20 '10 at 00:06
  • I tried this code but it didn't work. I'll try again and will let you know about the result. Thanks! – dedalo Jan 20 '10 at 22:19