Skip to content

Function: getTrackDuration() ​

ts
function getTrackDuration(segments): number;

Defined in: mapper/dash/mapDashToHam/utils/getTrackDuration.ts:16

Internal

Calculate the duration of a track.

This is calculated using the sum of the duration of all the segments from the track.

An alternative to this could be number of segments * duration of a segment.

Parameters ​

segments ​

Segment[]

Segments to calculate the sum of the durations

Returns ​

number

Duration of the track

A Streaming Video Technology Alliance project.