Member Junction
    Preparing search index...

    Function Fmp4PieceToVideoFrame

    • A piece of fragmented MP4 as a frame: Piece from its first box; for an init segment, Width and Height from its video track; for a fragment, PresentationTimeMs and KeyFrame from its first video sample, timed by init's video track. A fragment without a video sample (an audio-only fragment of a muxed stream), one before any init, or one that can't be read gets neither: it still plays.

      The MIME type stays as the provider sent it when it names video/mp4; otherwise it is 'video/mp4'. Bytes labelled video/mp4 that open with no MP4 box (a lone mdat) are a fragment.

      Parameters

      • data: ArrayBuffer

        The piece.

      • mimeType: string

        Its MIME type, when the provider named one.

      • init: Fmp4Init

        The stream's latest init segment, read; null before the first.

      Returns RealtimeFmp4VideoFrame

      The frame, or null when the bytes are neither labelled video/mp4 nor open with an MP4 box.