annotate www/martin/js/jaysalvat-buzz-05c96cc/README.md @ 101:52e44ee1c791
tip master
enabled all scores in autostart script
author |
Rob Canning <rc@kiben.net> |
date |
Tue, 21 Apr 2015 16:20:57 +0100 |
parents |
b7f9ade92165 |
children |
|
rev |
line source |
rc@74
|
1 # Buzz, a Javascript HTML5 Audio library
|
rc@74
|
2
|
rc@74
|
3 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 properly on non-modern browsers.
|
rc@74
|
4
|
rc@74
|
5 var mySound = new buzz.sound( "/sounds/myfile", {
|
rc@74
|
6 formats: [ "ogg", "mp3", "acc" ]
|
rc@74
|
7 });
|
rc@74
|
8
|
rc@74
|
9 mySound.play()
|
rc@74
|
10 .fadeIn()
|
rc@74
|
11 .loop()
|
rc@74
|
12 .bind( "timeupdate", function() {
|
rc@74
|
13 var timer = buzz.toTimer( this.getTime() );
|
rc@74
|
14 document.getElementById( "timer" ).innerHTML = timer;
|
rc@74
|
15 });
|
rc@74
|
16
|
rc@74
|
17 ### Official website
|
rc@74
|
18 http://buzz.jaysalvat.com/
|
rc@74
|
19
|
rc@74
|
20 ### Real life demo
|
rc@74
|
21 http://buzz.jaysalvat.com/demo/
|
rc@74
|
22
|
rc@74
|
23 ### Documentation
|
rc@74
|
24 http://buzz.jaysalvat.com/documentation/ |