Skip to content
scroll to zoom · drag to pan

HlsRung

type HlsRung = {
bandwidth: number;
durationSec?: number;
height: number;
name: string;
segments?: number;
url: string;
width: number;
};

Defined in: packages/asset-client/src/index.ts:315

One rung of an adaptive HLS ladder.

segments / durationSec are what make a ladder JUDGEABLE rather than merely present. Measured on a prod ladder of an 87 s 4K source: 240p cut at 14.35 s in 12 segments, 720p at 5.63 s in 12, 2160p at 5.88 s in 14. Cuts that do not line up cannot be swapped, and a swap is what a rendition switch IS — so that ladder looked complete and adapted badly. One segment means zero switch points: whichever rung the player opens on is the rung it finishes on.

Both are optional because a rung whose playlist could not be read is recorded WITHOUT them rather than with a zero — unmeasured and none are different facts, and a 0 there would read as the latter.

bandwidth: number;

Defined in: packages/asset-client/src/index.ts:322

BANDWIDTH in bits per second.


optional durationSec?: number;

Defined in: packages/asset-client/src/index.ts:328

Sum of the #EXTINF values, seconds.


height: number;

Defined in: packages/asset-client/src/index.ts:320


name: string;

Defined in: packages/asset-client/src/index.ts:317

Rung directory / identity — "720p".


optional segments?: number;

Defined in: packages/asset-client/src/index.ts:326

#EXTINF count.


url: string;

Defined in: packages/asset-client/src/index.ts:324

Absolute URL of this rung’s media playlist.


width: number;

Defined in: packages/asset-client/src/index.ts:319

RESOLUTION from the master playlist.