Jump to content
xisto Community
darran

Audio Streaming How do I make it work for Firefox?

Recommended Posts

There is a problem with internet radio streaming in firefox, it seems to be working well in IE but in firefox it just does not play at all. This is the code I am using:

<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="player" width="280" height="50">			<param name="url" value="someurl"/>			<param name="src" value="someurl"/>			<param name="showcontrols" value="true"/>			<param name="showstatusbar" value="true"/>			<param name="autostart" value="true"/>			</object>			<object type="video/x-ms-wmv" 			 data="someurl" width="280" height="50">			  <param name="src" value="someurl"/>			  <param name="autostart" value="true"/>			  <param name="controller" value="true"/>			  <param name="showstatusbar" value='1'/>			</object>

someurl in the link stands for the streaming .asx file. Can some expert in media API tell me what can I do to make this code work for Firefox and IE 7? Thanks in advance.
Edited by darran (see edit history)

Share this post


Link to post
Share on other sites

The <object> tag works specifically in IE (and Netscape, which incudes and activeX plugin). The main reason it doesn't work in Firefox is because of the same reason Firefox is safer than IE: Firefox just doesn't support ActiveX controls, which are embedded in a document with the <object> tag.

Notice from jlhaslip:
Edit to remove duplicate data.
Edited by jlhaslip (see edit history)

Share this post


Link to post
Share on other sites

So <object> is containing a plugin which is not viewable for Firefox I presume? What does <embed> contain? Does it contain ActiveX as well which will not be viewable by Firefox too?

Share this post


Link to post
Share on other sites

So <object> is containing a plugin which is not viewable for Firefox I presume? What does <embed> contain? Does it contain ActiveX as well which will not be viewable by Firefox too?

I don't know exactly how Firefox handles the <object> tag, but the basic idea is that Firefox won't render it. I am guessing that if you load a page that contains an <object>, then Firefox will just ignore it. The alternative to <object> for firefox is probably <embed>, whose usage I am not totally familiar with.

Share this post


Link to post
Share on other sites

Although this Embed an Object Hack tutorial deals with Flash, use a similar approach and you should get the audio to work regardless of the Browser.
The Hack is to use both an object and an embed tag together.
Unfortunately, this seems to be a universally acceptable method of incorporating "embedded objects".
The downside is that the page won't validate, so unless it is imperative that the page is (x)html valid, this seems to be the method to use.

Share this post


Link to post
Share on other sites

Although this Embed an Object Hack tutorial deals with Flash, use a similar approach and you should get the audio to work regardless of the Browser.

The Hack is to use both an object and an embed tag together.

Unfortunately, this seems to be a universally acceptable method of incorporating "embedded objects".

The downside is that the page won't validate, so unless it is imperative that the page is (x)html valid, this seems to be the method to use.

 

That method does work. I have seen that done many times. I may look into this a bit more for you; I'll probably try find a site that uses one or the other implementation of embedded objects.

Share this post


Link to post
Share on other sites

What is the difference between flash and asx? Is it simply the file extension? I don't think people want to validate a web player page. Hopefully you can find a site which uses this :P

Share this post


Link to post
Share on other sites

Flash is now-Adobe's animation tool, and ASX is Microsoft's video streaming technology. Typically ASX is used for opening streaming media files quickly in Windows Media Player.

Share this post


Link to post
Share on other sites

I managed to somehow fix the problem of the audio streaming on Firefox. In actual fact, Firefox did understood my code and the <object> tag, the problem it was not playing was pretty silly when I come to think of that. The source was using a relative file called "/***/***.asx", but seeing as it is a relative link to my current directory where the page is located, there should not be a "/" at the beginning of the source file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.