Sounds in Firefox

Games in project or under development. The posts and games in this section can not ask for money.

Re: Sounds in Firefox

Postby tlaero » Fri, 10Jun04 12:34

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
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Sounds in Firefox

Postby mung » Fri, 10Jun04 23:08

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">
mung
sirens hunter
 
Posts: 12
Joined: Sun, 09Sep13 23:00

Re: Sounds in Firefox

Postby TheBrain » Sat, 10Jun05 04:38

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).
TheBrain
star of the reef
 
Posts: 380
Joined: Sun, 09Mar29 23:00

Re: Sounds in Firefox

Postby yawner » Sat, 10Jun05 17:43



works for sure for .wav, ff 3.5.7
yawner
great white shark
 
Posts: 34
Joined: Sat, 08Dec06 00:00

Re: Sounds in Firefox

Postby tlaero » Sun, 10Jun06 09:15

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
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Sounds in Firefox

Postby yawner » Sun, 10Jun06 09:54

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.

yawner
great white shark
 
Posts: 34
Joined: Sat, 08Dec06 00:00

Re: Sounds in Firefox

Postby Squeeky » Sun, 10Jun06 10:11

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?
Squeaky is clean, I'm just a tad messy!
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4169
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

Re: Sounds in Firefox

Postby TheBrain » Mon, 10Jun07 01:09

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).
TheBrain
star of the reef
 
Posts: 380
Joined: Sun, 09Mar29 23:00

Re: Sounds in Firefox

Postby tlaero » Mon, 10Jun07 09:52

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
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Sounds in Firefox

Postby Arnulf » Mon, 10Jun07 20:03

Amazing! I tested the sound with Firefox and it works!!
User avatar
Arnulf
Master of the skies and the waves
 
Posts: 1952
Joined: Sun, 08May25 23:00
Location: Vienna/Austria

Re: Sounds in Firefox

Postby tlaero » Wed, 10Jun09 08:01

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.
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Sounds in Firefox

Postby Arnulf » Wed, 10Jun09 13:36

You can do it with IE, but not with Firefox!
User avatar
Arnulf
Master of the skies and the waves
 
Posts: 1952
Joined: Sun, 08May25 23:00
Location: Vienna/Austria

Re: Sounds in Firefox

Postby ChM » Mon, 10Jul12 21:10

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 :)
ChM
Pilot fish
 
Posts: 1
Joined: Fri, 09Dec04 00:00


Return to Projects

Who is online

Users browsing this forum: No registered users and 9 guests

eXTReMe Tracker