Skip to content
Type

HlsInputFormatOptions

Additional HLS input configuration.

ts
type HlsInputFormatOptions = {
	offsetTimestampsByDateTime?: boolean;
};

Used by

Properties

offsetTimestampsByDateTime

ts
offsetTimestampsByDateTime?: boolean;

Whether, in the presence of #EXT-X-PROGRAM-DATE-TIME tags, to offset track and packet timestamps to be relative to the Unix epoch.

Defaults to true, meaning packet timestamps map directly to wall-clock time. This guarantees AV sync across multiple tracks, even with gaps present.

When you don't want this mapping, you can set this value to false. In addition to timestamps not being Unix timestamps anymore, any gaps in the playlist are also naturally removed. When false, you can still access the wall-clock Unix timestamps via InputTrack.getUnixTimeForTimestamp.

Released under the Mozilla Public License 2.0.