I\'m experimenting with porting a simple audio utility called VoiceWalker to Javascript. VoiceWalker is a tool to help people transcribe audio, and it works like this:
Make clip call itself:
clip
function clip(audio, start, stop){ audio.currentTime = start; audio.play(); int = setInterval(function() { if (audio.currentTime > stop) { audio.pause(); clearInterval(int); // Play it again, 2 seconds further. clip(audio, start + 2, stop + 2); } }, 10); }