@daily-co/daily-react
Version:
Daily React makes it easier to integrate [@daily-co/daily-js](https://www.npmjs.com/package/@daily-co/daily-js) in React applications.
12 lines (11 loc) • 685 B
TypeScript
type AudioLevelCallback = (volume: number) => void;
type ErrorCallback = (errorMsg: string) => void;
/**
* Observes the volume level for a given participant.
* @param id The session_id of the participant to observe.
* @param cb The function to execute when the volume changes. Can be used to visualise audio output.
* @param errorCb Error callback. Called when local audio level observer is not available in browser.
* @param interval Callbacks will be executed at this freqency. If unspecified, Daily's default frequency is used.
*/
export declare const useAudioLevelObserver: (id: string, cb: AudioLevelCallback, errorCb?: ErrorCallback, interval?: number) => void;
export {};