Page 1 of 1

Re: Sounds in Firefox

PostPosted: Fri, 10Jun04 12:34
by tlaero
There have been a number of times where I tried to do something cool with the dating game code, had it work in IE, and fail in Firefox. I think Firefox hates me.

My most recent attempt was to add sounds to the html dating games. There are a ton of ways to do it in IE, but I've failed miserably to get Firefox to play them. I've installed the Media Player Plugin. I've tried .wav, .mp3, and even .mid. None work. It says it wants me to install QuickTime, but there are some things a girl just won't do.

Does anyone know of a way to get Firefox to play background sounds when you navigate to a page? I'd like for Phreaky and Chaotic and others to be able to add sounds to their virtual dating games.

Thanks,
Tlaero

Re: Sounds in Firefox

PostPosted: Fri, 10Jun04 23:08
by mung
I personally have no idea how to help you. However, I found this on another site and it seems to be what you need. Someone was asking the same question as you. Hope it helps. If not, then I hope someone can give you a real answer.

classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://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">




pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
showcontrols="true" width="1" height="1"
src="yoursong.mp3" autostart="false" hidden="true" loop="true">

Re: Sounds in Firefox

PostPosted: Sat, 10Jun05 04:38
by TheBrain
I would assume making a little player in flash could do the trick. It could be similar to the mp3 playing things you see all over the web now, but it doesn't need any interactivity. It would definitely be more practical than an ActiveX solution which confines players to using Windows.
Only real concern I'd have is that it's likely there would be a loading delay if it isn't persistent (i.e. it would load on the html page that contains the sound without any preloading/buffering/etc., which you could obviously solve by having the flash thing load when the game starts and persist (in its own frame or something) and playing sounds on request through javascrïpt).

Re: Sounds in Firefox

PostPosted: Sat, 10Jun05 17:43
by yawner


works for sure for .wav, ff 3.5.7

Re: Sounds in Firefox

PostPosted: Sun, 10Jun06 09:15
by tlaero
mung, thank you, but we have a lot of mac and linux users here. I don't think using ActiveX will fly. If people were to go for that, I could more easilly say "Use IE" where sounds (among other things) are easy.

TheBrain, I haven't really played with Flash much. I'd rather not make users install a player, though.

Yawner, whan I do that, Firefox (3.6.3) tells me "Additional plugins are required to display all the media on this page." Then it tries to get me to install Quicktime. I still have scars from the last time I put Quicktime on my system. Never again. (-:

Tlaero

Re: Sounds in Firefox

PostPosted: Sun, 10Jun06 09:54
by yawner
Sad to hear that, it must have been really sneaky piece of software if scars are involved.

Well... then maybe HTML5 and audio tag? At least for firefox. It's still works various on different browser, firefox and opera played .wav for me, chrome .ogg and ie doesn't support it.


Re: Sounds in Firefox

PostPosted: Sun, 10Jun06 10:11
by Squeeky
While I do not know what this is exactly about, I know that scrïpts can be written to detect major browsers.

Might a scrïpt:
if IE .....
else
if Mozilla ....

etc overcome any issues?

Re: Sounds in Firefox

PostPosted: Mon, 10Jun07 01:09
by TheBrain
tlaero wrote :
TheBrain, I haven't really played with Flash much. I'd rather not make users install a player, though.

The only thing users need to have installed is Flash (which is pretty standard to have these days). You'd end up with something which works similar to for example http://flash-mp3-player.net/players/js/ (of course for your purposes you wouldn't need a UI with a play button, at best maybe a mute button :P).

Re: Sounds in Firefox

PostPosted: Mon, 10Jun07 09:52
by tlaero
Awesome, yawner! The HTML5 version works. There's a bug that makes it no loop, but presumably they'll fix that eventually. This code covers both Firefox and IE.



Thanks!

Phreaky, I'm going to play with this some, but I'm pretty sure we can add sounds without changing AdventureCreator. Seems like I could just write a PlaySound function for _functions.js and you could call it in the onload section.

Tlaero

Re: Sounds in Firefox

PostPosted: Mon, 10Jun07 20:03
by Arnulf
Amazing! I tested the sound with Firefox and it works!!

Re: Sounds in Firefox

PostPosted: Wed, 10Jun09 08:01
by tlaero
Interestingly, neither IE nor Firefox like it when you play a sound from OnLoad. They both misbehave, in different ways. I'll think through how I want to do this. It would be easy enough doing it within a , but I'll think if there's something I like better. If not, I'll update AdventureCreator to add sounds.

Thanks again, yawner.

Re: Sounds in Firefox

PostPosted: Wed, 10Jun09 13:36
by Arnulf
You can do it with IE, but not with Firefox!

Re: Sounds in Firefox

PostPosted: Mon, 10Jul12 21:10
by ChM
Hey there!

in case you still need a sound player for whatever browser you want, try using this one:
http://www.schillmania.com/projects/soundmanager2/

it's free, and damn good. Also, it may be a little heavy weight for your needs :)