@observertc/samples-decoder
Version:
ObserveRTC Library for Decoding Samples
115 lines • 5.24 kB
TypeScript
export declare const logger: {
debug: (...args: unknown[]) => void;
error: (...args: unknown[]) => void;
warn: (...args: unknown[]) => void;
info: (...args: unknown[]) => void;
};
export interface Decoder<I, O> {
actualValue?: O;
decode(newValue?: I): O | undefined;
reset(): void;
}
export interface AttachmentDecoder extends Decoder<string, Record<string, unknown>> {
reset(): void;
}
export type ClientSampleDecoderSettings = {
callIdIsUuid?: boolean;
clientIdIsUuid?: boolean;
peerConnectionIdIsUuid?: boolean;
trackIdIsUuid?: boolean;
};
export interface AttachmentsDecoderFactory {
createIceCandidatePairAttachmentDecoder(): AttachmentDecoder;
createCodecStatsAttachmentDecoder(): AttachmentDecoder;
createMediaSourceAttachmentDecoder(): AttachmentDecoder;
createMediaPlayoutAttachmentDecoder(): AttachmentDecoder;
createClientSampleAttachmentDecoder(): AttachmentDecoder;
createPeerConnectionSampleAttachmentDecoder(): AttachmentDecoder;
createCertificateAttachmentDecoder(): AttachmentDecoder;
createIceCandidateAttachmentDecoder(): AttachmentDecoder;
createIceTransportAttachmentDecoder(): AttachmentDecoder;
createInboundTrackAttachmentDecoder(): AttachmentDecoder;
createOutboundTrackAttachmentDecoder(): AttachmentDecoder;
createInboundRtpAttachmentDecoder(): AttachmentDecoder;
createOutboundRtpAttachmentDecoder(): AttachmentDecoder;
createDataChannelAttachmentDecoder(): AttachmentDecoder;
createRemoteInboundRtpAttachmentDecoder(): AttachmentDecoder;
createRemoteOutboundRtpAttachmentDecoder(): AttachmentDecoder;
createPeerConnectionTransportAttachmentDecoder(): AttachmentDecoder;
}
export declare class DefaultAttachmentDecoderFactory implements AttachmentsDecoderFactory {
createIceCandidatePairAttachmentDecoder(): AttachmentDecoder;
createCodecStatsAttachmentDecoder(): AttachmentDecoder;
createClientSampleAttachmentDecoder(): AttachmentDecoder;
createInboundTrackAttachmentDecoder(): AttachmentDecoder;
createOutboundTrackAttachmentDecoder(): AttachmentDecoder;
createPeerConnectionSampleAttachmentDecoder(): AttachmentDecoder;
createCertificateAttachmentDecoder(): AttachmentDecoder;
createIceCandidateAttachmentDecoder(): AttachmentDecoder;
createIceTransportAttachmentDecoder(): AttachmentDecoder;
createInboundRtpAttachmentDecoder(): AttachmentDecoder;
createOutboundRtpAttachmentDecoder(): AttachmentDecoder;
createDataChannelAttachmentDecoder(): DefaultAttachmentDecoder;
createRemoteInboundRtpAttachmentDecoder(): DefaultAttachmentDecoder;
createRemoteOutboundRtpAttachmentDecoder(): DefaultAttachmentDecoder;
createMediaSourceAttachmentDecoder(): DefaultAttachmentDecoder;
createMediaPlayoutAttachmentDecoder(): DefaultAttachmentDecoder;
createPeerConnectionTransportAttachmentDecoder(): DefaultAttachmentDecoder;
}
export declare class DefaultAttachmentDecoder implements AttachmentDecoder {
private _actual?;
get actualValue(): Record<string, unknown> | undefined;
set actualValue(value: Record<string, unknown> | undefined);
constructor();
reset(): void;
decode(newValue?: string): Record<string, unknown> | undefined;
}
export declare class OneTimePassDecoder<T> implements Decoder<T, T> {
actualValue: T | undefined;
reset(): void;
decode(newValue?: T): T | undefined;
}
export declare class OneTimePassUuidByteArrayToStringDecoder implements Decoder<Uint8Array, string> {
actualValue?: string;
reset(): void;
decode(newValue?: Uint8Array): string | undefined;
}
export declare class OneTimePassByteArrayToStringDecoder implements Decoder<Uint8Array, string> {
actualValue?: string;
reset(): void;
decode(newValue?: Uint8Array): string | undefined;
}
export declare class StringToStringDecoder implements Decoder<string, string> {
actualValue: string | undefined;
reset(): void;
decode(newValue?: string): string | undefined;
}
export declare class Uint8ArrayToStringDecoder implements Decoder<Uint8Array, string> {
actualValue: string | undefined;
reset(): void;
decode(newValue?: Uint8Array): string | undefined;
}
export declare class NumberToStringDecoder implements Decoder<number, string> {
actualValue: string | undefined;
reset(): void;
decode(newValue?: number): string | undefined;
}
export declare class BigIntToNumberDecoder implements Decoder<bigint, number> {
actualValue: number | undefined;
reset(): void;
decode(newValue?: bigint): number | undefined;
}
export declare class NumberToNumberDecoder implements Decoder<number, number> {
actualValue: number | undefined;
reset(): void;
decode(newValue?: number): number | undefined;
}
export declare class BooleanToBooleanDecoder implements Decoder<boolean, boolean> {
actualValue: boolean | undefined;
reset(): void;
decode(newValue?: boolean): boolean | undefined;
}
export declare function bytesArrayToString(bytes: Uint8Array): string;
export declare function uuidByteArrayToString(byteArray: Uint8Array): string;
export declare function convertUint8ToBase64(aBytes: Uint8Array): string;
//# sourceMappingURL=utils.d.ts.map