Jump to content
xisto Community
Sign in to follow this  
yosh

Object Tag / Embed Tag using them to play audio files

Recommended Posts

I have a problem and i've looked everywhere for an answer. I'm tryin to play mp3 files on my web page, but i'm well aware of compatibility problems that occur with these tags as far as Safari and IE, etc.

This is the code i'm trying to use:

<OBJECT CLASSID="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" CODEBASE="https://support.microsoft.com/help/18612/windows-media-player WIDTH=300>   <PARAM NAME="type" VALUE="audio/mpeg"><PARAM NAME="src" VALUE="http://path.mp3">'>http://path.mp3"> <PARAM NAME="autoplay" VALUE="false"> <PARAM NAME="controller" VALUE="true"><PARAM NAME="bgcolor" VALUE="#005DA1"><EMBED HEIGHT=16 WIDTH=300 TYPE="audio/mpeg" PLUGINSPAGE="https://support.apple.com/kb/DL837?locale=en_US; SRC="http://path.mp3" AUTOPLAY="false" CONTROLLER="true"BGCOLOR=#005DA1/>   </OBJECT>
The object tag has info so that it will open the mp3 file with windows media player, while the embed info opens it up with quick time. I did it this way because people that have Windows usually have IE and usually have windows media player; but people that have Mac computers usually have Safari and quick time. What i hope for with this code is that IE people will open the file with WMP without having to download anything because they'll already have the app; and Safari people will open the file with QT without problem cause they should already have it. Browsers that read object tag will use WMP, the ones that read embed will open it with QT. I haven't figuredout what happens when the browser can read both tags though.
Either way, my problem is that even though the code works wonderfully for QT, for some reason WMP doesn't load the mp3. everything shows up like i want it to, even the controllers and everything, but it won't load the song. can anybody explain to me why?

Share this post


Link to post
Share on other sites

being I only use IE and Firefox, really could not help you that much. But I have used these codes before. I have learned however it is best to use just one player in the coding, then have a link below it for your other type of players such as Quicktime Winamp real player. You would be suprised how many people may have say quicktime but use something like Real Player or Winamp. So you have to keep these other players in mind too when making your script.Good luck

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
Sign in to follow this  

×
×
  • 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.