@byomakase/omakase-player
    Preparing search index...

    Class MediaMetadataResolver

    Index

    Constructors

    Methods

    • Lowest video packet timestamp of given media bytes, in seconds. Packets are scanned (metadata only) because first packet in decode order is not necessarily the first presented one.

      Parameters

      • bytes: Uint8Array

      Returns Promise<number | undefined>

    • Presentation time of the first video frame of a fMP4 media segment, read together with its init segment (a bare media segment is not parsable on its own). Lowest video packet timestamp of the segment, in seconds.

      Parameters

      • initSegment: SegmentLocation
      • segment: SegmentLocation

      Returns Observable<number | undefined>

      first video frame time, undefined if there is no video track or packets

    • Resolves where the first video frame of fMP4 HLS stream lands on media element timeline. hls.js passes fMP4 through without rewriting timestamps (in every version), so it is the first fragment's lowest video presentation time, read from the init segment and first fragment together.

      Falls back to probing the fragment alone, which only works for self-contained fragments, and to 0 if that fails too.

      Parameters

      • firstFragment: SegmentLocation & { initSegment?: SegmentLocation | null }

        First fragment of media playlist, with its init segment

      Returns Observable<number | undefined>

    • First video frame time of fMP4 HLS stream as appended to MSE SourceBuffer - first fragment's lowest video presentation time from its decode time and composition offsets, without edit lists, which browsers ignore for fragmented MP4 in MSE, see Fmp4SampleTimes. hls.js further shifts it by initPTS. Falls back to getHlsFmp4FirstVideoFrameTime if it can't be read.

      Parameters

      • firstFragment: SegmentLocation & { initSegment?: SegmentLocation | null }

        First fragment of media playlist, with its init segment

      Returns Observable<number | undefined>

    • Type Parameters

      • K extends keyof MediaMetadata

      Parameters

      • src: string
      • keys: K[]

      Returns Observable<Pick<MediaMetadata, K>>