0.2.0 • Published 8 years ago

audioclip v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Audioclip

Easily load and play (over and over again if you like) all or part of short(ish) audio files in the browser.

Uses the Web Audio API when available (which supports precise play length and multiple instances of the same sound playing at once), otherwise falls back to HTML5 <audio> tags. If those aren't available either (Internet Explorer 8 and below, basically), a graceful degradation to silence occurs.

API

var clip = new AudioClip(url); // Load the clip

clip.play(); // Play entire clip

clip.play(start_time_in_seconds);  // Play clip from start time to end

clip.play(start_time_in_seconds, duration_in_seconds); // Play clip from start time to start time + duration

Licence

MIT

0.2.0

8 years ago

0.1.3

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago