tags:

views:

18

answers:

1

I'm building a web application to support RPG games, like Dungeons & Dragons. It's like a AJAX chat room with dice rollers, avatars, shared information, character sheets and so on...

One of my desired features is to let the game master to play music to all game members.

How can I implement that?

I'm building the application with Asp.NET, using C# 3.5.

In the client side I'm using jQuery (latest version).

I intend to avoid Flash and Silverlight (even if the music resource will be available to some browsers only).

I tryed to use ogg format, but I don't know how to make it work with my own audio files. Do I need to implement a stream or something?

The application already is online. If someone want to see it, let me know. But it's only available in portuguese (Brazil).

Any tip will be apreciated.

A: 

You have a better chance of integrating the sound if its a mp3, then using javascript or HTML5.

HTML5 Code:

<audio src="anyone-there.mp3" autoplay controls></audio>

Read more here - http://www.html5laboratory.com/playing-with-audio-files.php

HTML5 is not supported by many browsers, so using a javascript to play the sound would be alot better.

Connnnoorr
Don't mention it.
Connnnoorr
Great content, but it doesn't solve my problem.Mp3 is not supported by Firefox.The website reference says that Firefox supports ogg, but it doesn't works for me. Only works on Chrome.Here is the sample:http://www.roleplayonline.com.br/audio.htmSorry for the previous comment, I posted it by mistake and I couldn't find the delete command in StackOverflow! Only edit...
Juliano