Documentation
    Preparing search index...

    Class IsoViewBeta

    ISO BMFF data view. Similar to DataView, but with additional methods for reading ISO BMFF data. It implements the iterator protocol, so it can be used in a for...of loop.

    Index

    Constructors

    • Beta

      Creates a new IsoView instance. Similar to DataView, but with additional methods for reading ISO BMFF data. It implements the iterator protocol, so it can be used in a for...of loop.

      Parameters

      • raw: ArrayBuffer | Uint8Array<ArrayBuffer> | DataView<ArrayBuffer>

        The raw data to view.

      • Optionalconfig: IsoViewConfig

        The configuration for the IsoView.

      Returns IsoView

    Accessors

    • get bytesRemaining(): number
      Beta

      The number of bytes remaining in the data view.

      Returns number

    • get cursor(): number
      Beta

      The current byteoffset in the data view.

      Returns number

    • get done(): boolean
      Beta

      Whether the end of the data view has been reached.

      Returns boolean

    Methods

    • Beta

      Reads an array of values from the data view.

      Type Parameters

      Parameters

      • type: T

        The type of the values.

      • size: number

        The size of the values in bytes.

      • length: number

        The number of values to read.

      Returns IsoFieldTypeMap[T][]

      The array of values.

    • Beta

      Reads a number of boxes from the data view.

      Type Parameters

      Parameters

      • length: number

        The number of boxes to read.

      Returns T[]

      The boxes.

    • Beta

      Reads a byte array from the data view.

      Parameters

      • size: number

        The size of the data in bytes.

      Returns Uint8Array<ArrayBuffer>

      The data.

    • Beta

      Reads a number of entries from the data view.

      Type Parameters

      • T

      Parameters

      • length: number

        The number of entries to read.

      • map: () => T

        The function to map the entries.

      Returns T[]

      The entries.

    • Beta

      Reads a signed integer from the data view.

      Parameters

      • size: number

        The size of the integer in bytes.

      Returns number

      The signed integer.

    • Beta

      Reads a string from the data view.

      Parameters

      • size: number

        The size of the string in bytes.

      Returns string

      The string.

    • Beta

      Reads a template from the data view.

      Parameters

      • size: number

        The size of the template in bytes.

      Returns number

      The template.

    • Beta

      Reads a unsigned integer from the data view.

      Parameters

      • size: number

        The size of the integer in bytes.

      Returns number

      The unsigned integer.

    • Beta

      Reads a UTF-8 string from the data view.

      Parameters

      • Optionalsize: number

        The size of the string in bytes.

      Returns string

      The UTF-8 string.

    • Beta

      Creates a new IsoView instance with a slice of the current data view.

      Parameters

      • size: number

        The size of the slice.

      Returns IsoView

      A new IsoView instance.