/** * @module kung-fu/components */ /** * Configuration options for the AudioPlayer * * @interface AudioPlayerOptions */ export interface AudioPlayerOptions { /** * ID of the HTML container element for the audio player (without the # prefix) * * @type {string} * @memberof AudioPlayerOptions */ ContainerID: string; /** * Default audio source URL * * @type {string} * @memberof AudioPlayerOptions */ DefaultSource: string; } /** * AudioPlayer - A class for creating customizable audio players with playlist support * * @export * @class AudioPlayer */ export declare class AudioPlayer { /** * Player configuration options * * @private * @type {AudioPlayerOptions} * @memberof AudioPlayer */ private _opts; /** * Reference to the audio container DOM element * * @private * @type {HTMLDivElement} * @memberof AudioPlayer */ private _audioContainer; /** * Creates an instance of AudioPlayer. * Initializes the audio player with the specified container and default source. * * @param {AudioPlayerOptions} opts - Configuration options * @memberof AudioPlayer * @throws {Error} If the container or audio element cannot be found */ constructor(opts: AudioPlayerOptions); /** * Adds playlist functionality to the audio player * Sets up click event listeners on playlist items to switch audio sources * and update audio player elements (cover image, title, date, summary) * * @param {string} playlistID - The ID of the playlist container element (without the # prefix) * @returns {void} * @memberof AudioPlayer * @throws {Error} If the playlist element cannot be found */ withPlaylist(playlistID: string): void; } /** * Factory function to create an AudioPlayer instance * * @export * @param {string} audioContainerID - ID of the container element (without the # prefix) * @param {string} [defaultSource] - Optional default audio source URL * @returns {AudioPlayer} A new AudioPlayer instance */ export declare const createAudioPlayer: (audioContainerID: string, defaultSource?: string) => AudioPlayer;