Functions
decode
- decode<T>(track: string | Uint8Array | DataReader, decodeTrackDetails?: (reader: DataReader, sourceName: string) => undefined | T): TrackInfo & T
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
- encode<T>(trackInfo: TrackInfo & T, encodeTrackDetails?: (writer: DataWriter, trackInfo: TrackInfo & T) => void): Uint8Array
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
Decode base64 encoded, byte array, or data reader serialized track into track info