lib/slider-stops
Variables
FRAMERATE_STOPS
const FRAMERATE_STOPS: number[];Defined in: lib/slider-stops.js:17
Frame rates in frames per second, ascending: the rates displays and videos run at, with the rates between them where a step of a few frames is felt.
BITRATE_STOPS
const BITRATE_STOPS: number[];Defined in: lib/slider-stops.js:23
CBR bitrates in kbps, ascending: sub-Mbps steps for constrained links, every Mbps up to 100 Mbps, then coarse steps to 1 Gbps.
CRF_STOPS
const CRF_STOPS: number[];Defined in: lib/slider-stops.js:30
Every CRF from 50 to 5, descending, so the slider's right end is the higher quality.
Functions
stopsWithin()
function stopsWithin(
stops,
min,
max
): number[];Defined in: lib/slider-stops.js:40
The stops inside the span a server allows, in the list's order; the span's lower bound alone when none is.
Parameters
| Parameter | Type | Description |
|---|---|---|
stops | number[] | - |
min | number | - |
max | number | - |
Returns
number[]
stopIndex()
function stopIndex(stops, value): number;Defined in: lib/slider-stops.js:53
The index of the stop nearest a value, so a value between stops (a server default, a clamp, a choice from before the list changed) still has a place on the track; a tie goes to the earlier stop.
Parameters
| Parameter | Type | Description |
|---|---|---|
stops | number[] | - |
value | number | - |
Returns
number
withDisplayStop()
function withDisplayStop(stops, displayRate): object;Defined in: lib/slider-stops.js:70
The frame-rate stops with the display's own among them: the rate a stream
matching the display runs at, placed where it sorts and after a listed stop
of the same rate, so a fixed rate and following the display stay two
choices; display is its index, -1 where the display is unmeasured.
Parameters
| Parameter | Type | Description |
|---|---|---|
stops | number[] | - |
displayRate | number | - |
Returns
object
stops
stops: number[];display
display: number;framerateStopIndex()
function framerateStopIndex(
options,
framerate,
follows
): number;Defined in: lib/slider-stops.js:86
The slider position of a frame rate among withDisplayStop's stops: the
display's own where the rate follows the display, else the listed stop
nearest the rate.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | { stops: number[]; display: number; } | - |
options.stops | number[] | - |
options.display | number | - |
framerate | number | - |
follows | boolean | - |
Returns
number