jaysalvat / buzz

Buzz is a small but powerful Javascript library that allows you to easily take advantage of the new HTML5 audio element. It tries to degrade silently on non-modern browsers.
http://buzz.jaysalvat.com
MIT License
1.21k stars 227 forks source link

multiplay #83

Closed Latnok closed 8 years ago

Latnok commented 9 years ago

ever play() restarts play the sound maybe wait for previos play ended?

HaykoKoryun commented 9 years ago

Can you give us a bit more info about the project you are using it in. I just tried it on the demo here, open the console and write the folllowing code winSound.play() to play the win sound. Then keep on executing the code and you'll see it won't cause the sound effect to play from the beginning again.

Which browser are you using?

Latnok commented 9 years ago

Chrome, mozilla

a = new buzz.sound(['/snd/money.wav', '/snd/money.mp3'], {preload: true})

a.play() ~0.3 sec a.play() ~0.1 sec sound stops and paly again from begin of file a.play() ~0.2 sec sound stops and paly again from begin of file