473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Playing a sound in javascript

Jezternz
145 100+
Is there any efficient way to do this?
I found you could do it using
<bgsound> or <embeded>
Are these efficient and are they xhtml valid?
Is there no javascript functionality to play sounds?

Thanks, Josh
Jan 2 '09 #1
3 1518
Hmmm... without doing some research on Google I don't really know.

You could do it in Flash and trigger it from Javascript.
LongTail Video and the JW Player has a media player that has a javascript API, so you could load the jukebox into a hidden <div> somewhere and then use javascript to tell it which sound to play and when.
Jan 3 '09 #2
gits
5,390 Expert Mod 4TB
there is no JavaScript-method that plays sound ... but i think you may go for the <object>-tag

kind regards
Jan 3 '09 #3
acoder
16,027 Expert Mod 8TB
See Playing Sounds In The Browser - use a browser helper object.
Jan 9 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Brian Basquille | last post by:
Hello all, What is the syntax for simply playing a WAV file in your program? Am learning VB and have two VB books but don't wanna root through them to find the code. Any help would be much...
1
by: Kiteman \(Canada\) | last post by:
Instead of a beep sound playing as an alarm or reminder I would like to be able to play a more interesting sound. On the web, I found and tried a sound routine that uses the SOUND.DRV but it does...
1
by: Peter Schmitz | last post by:
Hi, I'm just trying to play a *.wav file, making use of the unmanaged function "sndPlaySoundA" in winmm.dll, but I still got one question: How can I avoid, that the sound file itself has to be...
2
by: laredotornado | last post by:
Hello, I had been given this code to play a single sound file embedded in a page. Sadly, the code doesn't actually "play" any sound file. Could you help supply some JS code that will play a sound...
7
by: Lee Moody | last post by:
I just want quick and easy way to play a .wav file out the standard sound device. It could even be as simple as activating a sound assigned to an existing windows sound event. Any suggestions?...
1
by: chris962 | last post by:
I have very basic knowledge of Javascript and am trying to get a web page to play one of two different sound files based on whether the user has correctly guessed a number. At the moment, all I...
5
by: mouseit101 | last post by:
Hello I was wondering if there was a way to load a streaming/static mp3, wav etc. with javascript and then beign able to control its playing, pausing etc. Sorry if this is a noobish question but I...
5
by: gazza67 | last post by:
Hi, Does anyone know how to check for when a sound has finished playing? I am currently using the SoundPlayer, there doesnt seem to be any event for this - am I missing something? Gary
3
by: Jack | last post by:
Hi, I'm writing a simple wav player (like winamp) and using the SoundPlayer class in c# 2005. Using winform buttons, I can begin playing the sound and stop half-way through the sound using:...
1
by: OBAFGKM_RNS | last post by:
I am not an expert in javascript, so forgive me if all this sounds dumb. On my webpage, I have slot machine. I want to hear a click sound when the wheels stop spinning. Heres how i can SORT OF do...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.