views:

1612

answers:

1

Hi,

I got this piece of code:

<object id="MMPlayer1"
codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701
type=application/x-oleobject height=238 width=240 align=absmiddle
classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95>
<param name="FileName" value="http://www.abradio.cz/asx/beta32.asx"&gt;
<param name="ShowControls" value="1">
<param name="ShowStatusBar" value="0">
<param name="ShowDisplay" value="0">
<param name="DefaultFrame" value="Slide">
<param name=”PlayCount” value="1">
<param name="Autostart" value="1">
<embed
src="http://www.abradio.cz/asx/beta32.asx" width=240 height=238 autostart=1 loop=0
align="absmiddle" type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp"
showcontrols=1 showdisplay=1 showstatusbar=0 > </embed></object>

It doesn't seem to work properly, as "no video" shows.. I'd rather have custom image to be shown instead of it, or control panel to pause, or stop the stream. Anyone can help with this one please?

A: 

You should use the Flash player to play video in all major browsers. You can embed it in the same way you did with Windows Media Player. The downside is that you cannot play ASX files with Flash unless you first convert them to FLV files. Check out this website for information on how to embed the Flash player. And check this out for converting your Windows Media files to Flash FLV files. It points to FFMpeg, an open source video converter. The executable files for Windows are here.

But to make your video play in all IE browsers do this:

For one, the video is not showing because you're using "Filename" instead of "URL" to point to a URL. :-)

To play the "beta32.asx" file remove the line:

<param name="FileName" value="http://www.abradio.cz/asx/beta32.asx"&gt;

And replace it with the line:

<param name="URL" value="http://www.abradio.cz/asx/beta32.asx"&gt;

To remove the playback controls from the player, change "ShowControls" to "0":

from:

<param name="ShowControls" value="1">

to:

<param name="ShowControls" value="0">

And use the examples found here to show how to wire up your own buttons to control the playback. It will require you to use some JavaScript.

CLaRGe
it does not work. Check out this URL in Firefox! : http://www.hrajsa.sk/hraj-Bulwark%2053-735-1.htm
Skuta
I had to disable it because user can't STOP the music - > I want to make sure He could. Isn't there some flash thing that can play streamed url?
Skuta
I wouldn't recommend trying to embed WMP from FireFox. It requires the user to install stuff on his end. Use Flash instead.
CLaRGe
It is possible to embed WMP in Firefox; the default Windows install tries to include a WMP plugin, and even some Linux distros try the same, albeit generally with codec difficulties. It's unreliable, but then even in IE I've found the WMP plugin unreliable...
bobince
If you wanted to change the player to Flash, unfortunately you'd also have to change the type of stream your radio station produces from WMA-in-MMS to MP3-in-HTTP (Icecast server, best for Flash) or MP3-in-ICY (SHOUTcast server). This might be out of your hands.
bobince