livekit-client
Version:
JavaScript/TypeScript client SDK for LiveKit
38 lines • 1.29 kB
TypeScript
import type { Throws } from '@livekit/throws-transformer/throws';
import type { BaseE2EEManager } from '../../../e2ee/E2eeManager';
import { DataTrackDepacketizerDropError } from '../depacketizer';
import type { DataTrackFrameInternal } from '../frame';
import { DataTrackPacket } from '../packet';
import { type DataTrackInfo } from '../types';
/**
* Options for creating a {@link IncomingDataTrackPipeline}.
*/
type Options = {
info: DataTrackInfo;
publisherIdentity: string;
e2eeManager: BaseE2EEManager | null;
};
/**
* Pipeline for an individual data track subscription.
*/
export default class IncomingDataTrackPipeline {
private publisherIdentity;
private e2eeManager;
private depacketizer;
/**
* Creates a new pipeline with the given options.
*/
constructor(options: Options);
updateE2eeManager(e2eeManager: BaseE2EEManager | null): void;
processPacket(packet: DataTrackPacket): Promise<Throws<DataTrackFrameInternal | null, DataTrackDepacketizerDropError>>;
/**
* Depacketize the given frame, log if a drop occurs.
*/
private depacketize;
/**
* Decrypt the frame's payload if E2EE is enabled for this track.
*/
private decryptIfNeeded;
}
export {};
//# sourceMappingURL=pipeline.d.ts.map