Amazon Vinyl
    Preparing search index...

    Interface SegmentReference<T>

    A reference, with metadata, to streaming and initialization data.

    interface SegmentReference<T> {
        data: T;
        endTime: number;
        initData: T;
        mediaTimeOffset?: number;
        quality: MediaQualityMetadata;
        startTime: number;
        timestampOffset: number;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index
    data: T

    Provides the media data.

    endTime: number

    The end time of the segment, in seconds. Relative to the MPD timeline. Should be used as the append window end.

    initData: T

    References initialization data for this segment. Must be appended before data if the decoderId has changed from the last buffered segment. This is a shared reference between other streaming segments of the same quality/representation.

    mediaTimeOffset?: number

    The time, in seconds, to add to the segment's media timestamps to place them on the presentation timeline, when the manifest defines it (DASH: Period@start − presentationTimeOffset / timescale). Used as the timestamp offset in 'segments' append mode. When undefined, the offset is anchored from the media timestamps of the first segment appended in a continuous run.

    Metadata describing the media encoding.

    startTime: number

    The start time of the segment, in seconds. Relative to the MPD timeline. Should be used as the append window start.

    timestampOffset: number

    The timestamp offset of the segment. Should be used as the append timestamp offset. This is in seconds, relative to the MPD timeline. For example if the first segment has a timestampOffset of -2 and startTime of 0, playback will begin 2s into the start of that segment.