Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Track

Index

Functions

Functions

  • decode<T>(track: string | Uint8Array | DataReader, decodeTrackDetails?: (reader: DataReader, sourceName: string) => undefined | T): TrackInfo & T
  • Decode base64 encoded, byte array, or data reader serialized track into track info

    Type parameters

    • T = Record<string, unknown>

    Parameters

    • track: string | Uint8Array | DataReader
    • Optional decodeTrackDetails: (reader: DataReader, sourceName: string) => undefined | T
        • (reader: DataReader, sourceName: string): undefined | T
        • Parameters

          • reader: DataReader
          • sourceName: string

          Returns undefined | T

    Returns TrackInfo & T

  • encode<T>(trackInfo: TrackInfo & T, encodeTrackDetails?: (writer: DataWriter, trackInfo: TrackInfo & T) => void): Uint8Array
  • Encode track info into serialized track

    Type parameters

    • T = Record<string, unknown>

    Parameters

    • trackInfo: TrackInfo & T
    • Optional encodeTrackDetails: (writer: DataWriter, trackInfo: TrackInfo & T) => void
        • (writer: DataWriter, trackInfo: TrackInfo & T): void
        • Parameters

          • writer: DataWriter
          • trackInfo: TrackInfo & T

          Returns void

    Returns Uint8Array

Generated using TypeDoc