Skip to content

0.3.0: Fairly big 0.3 update

Compare
Choose a tag to compare
@bvibber bvibber released this 03 May 06:30
* Add onbufferlow async event to ping caller for more data

Unlike onstarved, this is called asynchronously to reduce
the load on the critical audio path, and is fired off before
we run out of buffered data instead of after.

Should be suitable for driving additional activity.

If the default buffer size time is too short, caller can
set feeder.bufferThreshold property to a target time in seconds
at which we'll trigger the event if it arrives before the
minimum buffer size is reached.

The event is bounced asynchronously using setImmediate()
if available (Edge, IE) or through postMessage to the
window (Safari, Firefox, Chrome), neither of which get
throttled in background tabs.

* updated the flash waitUntilReady() to use the callback
instead of a timer check.

* added durationBuffered and playbackPosition properties.

Fixes https://github.com/brion/audio-feeder/issues/13
Fixes https://github.com/brion/audio-feeder/issues/7