Skip to content

Function: getDuration() ​

ts
function getDuration(manifest, segments): number | null;

Defined in: mapper/hls/mapHlsToHam/utils/getDuration.ts:15

Alpha

Calculate the duration of a track.

target duration * number of segments

Parameters ​

manifest ​

HlsManifest

Manifest of the track

segments ​

SegmentHls[]

Array of segments in a track

Returns ​

number | null

duration of a track

A Streaming Video Technology Alliance project.