buffer

buffer.js

Methods

(static) bufferedPercent(buffered, duration) → {number}

Compute the percentage of the media that has been buffered.

Parameters:
NameTypeDescription
bufferedmodule:time~TimeRange

The current TimeRanges object representing buffered time ranges

durationnumber

Total duration of the media

Returns:

Percent buffered of the total duration in decimal form.

Type: 
number