import { StreamReceiverState } from './interfaces'; import type { IConsumerCallbacks } from './interfaces/consumer'; import type { StreamRemote } from './remote'; import type { Session } from './session'; import { TypedEventEmitter } from './utils/typed-event-emitter'; import { type StreamLimit } from './utils/types'; /** * Represents a stream consumer that sets up views for specific viewers and configures layer settings. */ export declare class StreamConsumer extends TypedEventEmitter { private _session; private _remote; private receiver?; private keys; constructor(_session: Session, _remote: StreamRemote); get state(): StreamReceiverState; get stream(): MediaStream | undefined; /** * Sets up a view for a specific viewer key. * @param key - The key of the viewer. * @param limit - The limit to set for the view. * * @returns The MediaStream of the view. */ view(key: string, limit?: StreamLimit): MediaStream; /** * Sets the limit for a specific view by key. * @param key - The key of the view to set the limit for. * @param limit - The limit to set for the view. */ limit(key: string, limit: StreamLimit): void; /** * Removes a key from the set of viewed keys. * If the set becomes empty, stops the receiver and emits the 'state' event with StreamReceiverState.NoSource. * Otherwise, reconfigures the layer. * @param key - The key to be removed from the set of viewed keys. */ unview(key: string): void; /** * Configures the layer based on the selected viewers' priorities and maximum spatial/temporal values. * This method is only applicable for video streams. */ private configLayer; private onReceiverAudioLevelChanged; private onReceiverStateChanged; private onAddTrack; private onQuality; } //# sourceMappingURL=consumer.d.ts.map