import { Unsubscribe } from 'nanoevents'; import { Session } from 'src/session'; import { Stream } from 'src/stream'; import { ReadFn, UpdateFn } from 'src/state'; import { Participant } from 'src'; import { AVStreamSubscriber } from './avstream_subscriber'; import { StreamRegister } from './stream_register'; export interface Events { registered: (participantId: Participant['id'], key: Stream['key']) => void; reconfigured: (participantId: Participant['id'], key: Stream['key']) => void; unregistered: (participantId: Participant['id'], key: Stream['key']) => void; } export interface SubscriptionRegister { register: (participantId: Participant['id'], key: Stream['key'], config: { audio: boolean; video: boolean; }) => Promise; reconfigure: (participantId: Participant['id'], key: Stream['key'], config: { audio: boolean; video: boolean; }) => Promise; unregister: (participantId: Participant['id'], key: Stream['key']) => Promise; forceUnregister: (participantId: Participant['id'], key: Stream['key']) => Promise; get: (participantId: Participant['id'], key: Stream['key']) => AVStreamSubscriber | undefined; on(event: E, callback: Events[E]): Unsubscribe; } export declare const initSubscriptionRegister: ({ session, streamRegister, state, }: { session: Session; streamRegister: StreamRegister; state: { read: ReadFn; update: UpdateFn; }; }) => Promise;