Reply LinkBack Thread Tools Search this Thread
Old 23-06-2007, 00:24   #1 (permalink)
andynewbie
Registered User
 
Join Date: Jun 2007
Posts: 2
Very wierd problem with sound in IE and Firefox

Ok, I have a very specific problem related to using sound files on my website.

I have been using the following code to run several small sized versions of Windows Media Player on the page.

<tbody><tr><td><object id="mediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase=( I had to mash up the URL here or it wouldnt let me post the thread )activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" height="45" width="170"><param name="fileName" value="soundtest2.mp3"><param name="animationatStart" value="true"><param name="transparentatStart" value="true"><param name="autoStart" value="false"><param name="showControls" value="true"><param name="loop" value="false"><embed type="application/x-mplayer2" pluginspage=( I had to mash up the URL here or it wouldnt let me post the thread )microsoft.com/windows/mediaplayer/en/download/" id="mediaPlayer" name="mediaPlayer" displaysize="4" autosize="-1" bgcolor="darkblue" showcontrols="true" showtracker="-1" showdisplay="0" showstatusbar="-1" videoborder3d="-1" src="sountest2.mp3" autostart="false" designtimesp="5311" loop="false" height="45" width="170"></object></td></tr><!-- ...end embedded WindowsMedia file --></tbody>

This worked great in Internet Explorer, but for some reason not in Firefox, where whenever I loaded the page it always asked for new plugins and then couldnt find them or use them.

Im sure that there would be a way around this by messing with the preferences in Firefox, but I dont want my visitors to have to do this, because they will probably just quit and leave.

Does anybody know a way to make this work in both IE and Firefox, without messing around with extra plugins?

OR :

I did find this piece of code, which actually does work in both browsers without even mentioning searching for extra plugins :

<title>embed_v3</title></head><body><object id="objMediaPlayer" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" height="45" width="170">
<param name="FileName" value="soundtest2.mp3"><embed type="application/x-mplayer2" src="soundtest2.mp3" autostart="false" name="objMediaPlayer" height="45" width="170"></object><br></body></html>

As I said, this wrks fine in both IE and Firefox - the problem is, that it autostarts when I load the page, which is not what I want. What is very wierd is that this only happens in IE, not in Firefox. I have tried sticking in an "autostart=false" but that doesnt do any good. Does anybody know why this happens? Is it to do with the CLSID? Is there any way to stop it?

Thanks heaps for your help
  Reply With Quote
Old 23-06-2007, 02:36   #2 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
I have no idea what any of that code means, but I'd just use Flash. It's more widely supported than Windows Media, which is probably why you're first thing isn't working.

Of course, you're probably going to also have to contend with IE's "Click to start or activate this control..." ...feature.

That said, putting audio that automatically plays on a website is a major usability faux pas. No one wants to have to turn down their speakers when they visit your site. I, for one, will immediately leave a site if it starts playing music because a) it's obnoxious and b) I'm probably listening to my own music.
  Reply With Quote
Old 23-06-2007, 03:55   #3 (permalink)
andynewbie
Registered User
 
Join Date: Jun 2007
Posts: 2
P.S. I dont want to have to use Flash

First of all, thanks for the reply.

I also disapprove of automatic sound on web pages, thats why I dont want the sound to start on loading - this is the problem that Im trying to solve :-)

However, the site Im working on is for helping language students with their courses, so it is necessary for them to be able to play the sound files as part of the exercise.

However, as Im working in a 3rd world country where many people may not either have, or be able to download Flash players, I want to stick to the basic Windows Media version which I have now.

The only thing which I need to do is to stop it from playing immediately when I load the page. The Windows Media Player object which I have embedded has all of the "stop", "play", "pause", "rewind" controls, and they all work fine, but because ther are multiple audio exercises on each page, it is no good if they all start when you load the page.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8