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 content - The content overlay part. * @csspart legend - The legend part. * * @cssprop {String} --audio-aspect-ratio - The aspect ratio CSS custom property. * @cssprop {String} --audio-background-color - The background color CSS custom property. * @cssprop {String} --audio-border-color - The border color CSS custom property. * @cssprop {String} --audio-border-radius - The border radius CSS custom property. * @cssprop {String} --audio-border-style - The border style CSS custom property. * @cssprop {String} --audio-border-width - The border width CSS custom property. * @cssprop {String} --audio-font-family - The font family CSS custom property. * @cssprop {String} --audio-font-letter-spacing - The font letter spacing CSS custom property. * @cssprop {String} --audio-font-line-height - The font line height CSS custom property. * @cssprop {String} --audio-font-size - The font size CSS custom property. * @cssprop {String} --audio-font-text-decoration - The font text decoration CSS custom property. * @cssprop {String} --audio-font-text-transform - The font text transform CSS custom property. * @cssprop {String} --audio-font-weight - The font weight CSS custom property. * @cssprop {String} --audio-foreground-color - The foreground color CSS custom property. * @cssprop {String} --audio-gap - The gap CSS custom property. * @cssprop {String} --audio-legend-font-family - The legend font family CSS custom property. * @cssprop {String} --audio-legend-font-letter-spacing - The legend font letter spacing CSS custom property. * @cssprop {String} --audio-legend-font-line-height - The legend font line height CSS custom property. * @cssprop {String} --audio-legend-font-size - The legend font size CSS custom property. * @cssprop {String} --audio-legend-font-text-decoration - The legend font text decoration CSS custom property. * @cssprop {String} --audio-legend-font-text-transform - The legend font text transform CSS custom property. * @cssprop {String} --audio-legend-font-weight - The legend font weight CSS custom property. * @cssprop {String} --audio-padding-bottom - The padding bottom CSS custom property. * @cssprop {String} --audio-padding-left - The padding left CSS custom property. * @cssprop {String} --audio-padding-right - The padding right CSS custom property. * @cssprop {String} --audio-padding-top - The padding top CSS custom property. * @cssprop {String} --audio-shadow - The shadow CSS custom property. * @cssprop {String} --audio-shadow-blur - The shadow blur CSS custom property. * @cssprop {String} --audio-shadow-color - The shadow color CSS custom property. * @cssprop {String} --audio-shadow-offset-x - The shadow offset x CSS custom property. * @cssprop {String} --audio-shadow-offset-y - The shadow offset y CSS custom property. * @cssprop {String} --audio-shadow-spread - The shadow spread CSS custom property. * @cssprop {String} --audio-transition-duration - The transition duration CSS custom property. * @cssprop {String} --audio-transition-mode - The transition mode CSS custom property. * @cssprop {String} --audio-transition-property - The transition property CSS custom property. * @cssprop {String} --audio-translate - The translate CSS custom property. * * @dependency mosaik-text - The Text element. * * @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