UNPKG

livekit-client

Version:

JavaScript/TypeScript client SDK for LiveKit

12 lines 750 B
import { type Throws } from '@livekit/throws-transformer/throws'; import { DataTrackSerializeError } from './errors'; /** An abstract class implementing common behavior related to data track binary serialization. */ export default abstract class Serializable { /** Returns the expected length of the serialized output in bytes */ abstract toBinaryLengthBytes(): number; /** Given a DataView, serialize the instance inside and return the number of bytes written. */ abstract toBinaryInto(dataView: DataView): Throws<number, DataTrackSerializeError>; /** Encodes the instance as binary and returns the data as a Uint8Array. */ toBinary(): Throws<Uint8Array, DataTrackSerializeError>; } //# sourceMappingURL=serializable.d.ts.map