import { CssAspectRatio } from '@breadstone/mosaik-themes'; import { AudioLegendPosition } from '../../../Types/AudioLegendPosition'; import { CustomElement } from '../../Abstracts/CustomElement'; import type { IAudioElementProps } from './IAudioElementProps'; declare const AudioElement_base: (abstract new (...args: Array) => import("../../../Behaviors/Themeable").IThemeableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Disableable").IDisableableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Dimensionable").IDimensionableProps) & typeof CustomElement & import("../../../Behaviors/Themeable").IThemeableCtor; /** * Audio - A media control for playing sound. * * @element mosaik-audio * * @slot - The default content slot. * @slot legend - The legend slot. * * @csspart audio - The native audio element part. * @csspart legend - The legend part. * @csspart content - The content overlay part. * * @example * Basic audio player with controls: * ```html * * ``` * * @example * Looping muted audio with a legend: * ```html * * ``` * * @public */ export declare class AudioElement extends AudioElement_base implements IAudioElementProps { private _audioElement; private _src; private _autoPlay; private _showControls; private _legend; private _legendPosition; private _ratio; private _muted; private _loop; /** * @public */ constructor(); /** * Returns the `is` property. * The natural name of this element. */ static get is(): string; /** * Gets or sets the `src` property. * * @public */ get src(): string | MediaStream | MediaSource | Blob | null; set src(value: string | MediaStream | MediaSource | Blob | null); /** * Gets or sets the `autoPlay` property. * * @public * @attr */ get autoPlay(): boolean; set autoPlay(value: boolean); /** * Gets or sets the `showControls` property. * * @public * @attr */ get showControls(): boolean; set showControls(value: boolean); /** * Gets or sets the `legend` property. * * @public * @attr */ get legend(): string; set legend(value: string); /** * Gets or sets the `legendPosition` property. * * @public * @attr */ get legendPosition(): AudioLegendPosition; set legendPosition(value: AudioLegendPosition); /** * Gets or sets the `ratio` property. * * @public * @attr */ get ratio(): CssAspectRatio; set ratio(value: CssAspectRatio); /** * Returns the `muted` property. * * @public * @attr */ get muted(): boolean; set muted(value: boolean); /** * Returns the `loop` property. * * @public * @attr */ get loop(): boolean; set loop(value: boolean); /** * Returns true when a source is set. * * @public * @readonly */ get hasSrc(): boolean; /** * Plays the audio. */ play(): Promise; /** * Pauses the audio. */ pause(): void; /** * Toggles playback. */ toggle(): void; /** * Reloads the audio source. */ load(): void; /** * @protected * @override */ protected onApplyTemplate(): void; /** * Pauses when disabled. */ protected onDisabledPropertyChanged(_prevValue: boolean, nextValue: boolean): void; protected onClick(): void; } /** * @public */ export declare namespace AudioElement { type Props = IAudioElementProps; } /** * @public */ declare global { interface HTMLElementTagNameMap { 'mosaik-audio': AudioElement; } } export {}; //# sourceMappingURL=AudioElement.d.ts.map