javascript - Creating a countdown timer script that instead of a specific date counts the duration of a sound file -


i've created sound installation exhibition. sound file last 24 hours. create site file. want stark , simple possible. dark background , white countdown start once file start's streaming , countdowns until file ends. that's hour 24 00:00.

all countdown scripts count specific date , restart themselves.

is possible?

so if right want know how make progress bar?

i'd if don't want niddy-griddy parts, i'd recommend bootsrap , jquery.

i made example of do: http://jsfiddle.net/1tq6scga/3/

//js var song_seconds = 10;  c = 0; = 0; var invt = setinterval(function(){     c = i/song_seconds;     c = (math.round(c * 100 * 100)/100) + '%';     $('.progress-bar').html(c);     $('.progress-bar').css({'width':c});     i++;     if(i === song_seconds + 1) {         clearinterval(invt);     } }, 1000); 

so make variable max length of song in seconds. i'd wrap in function , once button play clicked code ran in background, , when pause song interval gets cleared.

i don't wanna write more this, because requires coding whole webpage. should enough started.


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -