Selkies

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

ParameterTypeDescription
stopsnumber[]-
minnumber-
maxnumber-

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

ParameterTypeDescription
stopsnumber[]-
valuenumber-

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

ParameterTypeDescription
stopsnumber[]-
displayRatenumber-

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

ParameterTypeDescription
options{ stops: number[]; display: number; }-
options.stopsnumber[]-
options.displaynumber-
frameratenumber-
followsboolean-

Returns

number