import { OnInit, OnDestroy, Injector, ElementRef } from '@angular/core'; import { ReUpdateInterType, UpdateParticipantAudioDecibelsType, ReUpdateInterParameters, Participant } from '../../../@types/types'; import { types } from 'mediasoup-client'; import * as i0 from "@angular/core"; type Consumer = types.Consumer; export interface MiniAudioPlayerParameters extends ReUpdateInterParameters { breakOutRoomStarted: boolean; breakOutRoomEnded: boolean; limitedBreakRoom: Participant[]; reUpdateInter: ReUpdateInterType; updateParticipantAudioDecibels: UpdateParticipantAudioDecibelsType; getUpdatedAllParams: () => MiniAudioPlayerParameters; [key: string]: any; } export interface MiniAudioPlayerOptions { stream: MediaStream | null; consumer: Consumer | null; remoteProducerId: string; parameters: MiniAudioPlayerParameters; MiniAudioComponent?: any; miniAudioProps?: Record; } export type MiniAudioPlayerType = (options: MiniAudioPlayerOptions) => HTMLElement; /** * The `MiniAudioPlayer` component manages audio playback for participants in a meeting, including volume control, audio visualization, and connection to the main application state. * It uses audio analysis to display waveforms for active speakers and supports breakout room conditions, participant-specific audio decibel updates, and other media state dependencies. * * @component * @example * ```html * * * ``` * * @param {MediaStream} [stream] - The audio stream from the participant. * @param {Consumer} [consumer] - The audio consumer for the participant. * @param {string} [remoteProducerId] - Unique ID for the remote producer of the audio stream. * @param {MiniAudioPlayerParameters} [parameters] - Configuration object with various parameters and utility functions for audio management. * @param {Component} [MiniAudioComponent] - Optional audio visualization component injected into the `MiniAudioPlayer`. * @param {Record} [miniAudioProps] - Additional properties for configuring the audio visualization component. * * @returns {HTMLElement} The created audio player element. * * @remarks * The `MiniAudioPlayer` processes audio data and manage audio levels. * It supports a dynamic breakout room feature that restricts audio visibility to limited participants, updates decibel levels for individual participants, and adjusts the waveforms based on audio activity. * * Key functionalities include: * - Automatically toggling wave visualization for active speakers. * - Handling audio settings for different room states (e.g., shared screens, breakout rooms). * - Injecting configuration and parameter dependencies dynamically through `Injector`. * * @dependencies * - `setInterval` for periodic volume level checks (auto-clears on component destruction). * - `ReUpdateInterType` and `UpdateParticipantAudioDecibelsType` for dynamic participant audio decibel management. * * @example * ```typescript * const audioPlayerParameters: MiniAudioPlayerParameters = { * breakOutRoomStarted: true, * breakOutRoomEnded: false, * limitedBreakRoom: participantList, * reUpdateInter: reUpdateInterFunc, * updateParticipantAudioDecibels: updateAudioDecibelsFunc, * getUpdatedAllParams: () => getParams(), * }; * * // Initialize component with required inputs * * ``` */ export declare class MiniAudioPlayer implements OnInit, OnDestroy { private injector; stream: MediaStream | null; consumer: Consumer | null; remoteProducerId: string; parameters: MiniAudioPlayerParameters; MiniAudioComponent: any; miniAudioProps: Record; audioElement: ElementRef; showWaveModal: boolean; isMuted: boolean; intervalId: any; autoWaveCheck: boolean; private previousShowWaveModal; private previousIsMuted; private previousMiniAudioProps; private audioStateRetryTimer; private injectorCache; private cachedMiniAudioProps; constructor(injector: Injector, injectedStream: MediaStream | null, consumer: Consumer, injectedRemoteProducerId: string, injectedParameters: MiniAudioPlayerParameters, injectedMiniAudioComponent: any, injectedMiniAudioProps: Record); ngOnInit(): void; ngOnDestroy(): void; private clearAudioStateRetryTimer; private getParticipantForProducer; private isTranslationAudio; private isTranslationSuppressingOriginal; private syncAudioElementState; private scheduleAudioStateSync; setupAudioProcessing(): void; createInjector(inputs: any): Injector; getMiniAudioProps(): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};