UNPKG

vidstack

Version:

Build awesome media experiences on the web.

37 lines (36 loc) 1.46 kB
import { type HTMLCustomElement } from 'maverick.js/element'; import { type MediaContext } from '../../core/api/context'; import type { MediaKeyShortcut } from '../../core/keyboard/types'; import { ToggleButton, type ToggleButtonAPI } from './toggle-button'; declare global { interface MaverickElements { 'media-mute-button': MediaMuteButtonElement; } } /** * A button for toggling the muted state of the player. * * @docs {@link https://www.vidstack.io/docs/player/components/buttons/mute-button} * @slot volume-muted - Used to override the default muted icon. * @slot volume-low - Used to override the default volume low icon. * @slot volume-high - Used to override the default volume high icon. * @example * ```html * <media-mute-button></media-mute-button> * ``` */ export declare class MuteButton extends ToggleButton { static el: import("maverick.js/element").CustomElementDefinition<MuteButtonAPI>; protected _media: MediaContext; protected _keyShortcut: MediaKeyShortcut; protected onAttach(el: HTMLElement): void; protected _onPress(event: Event): void; protected _isPressed(): boolean; protected _getLabel(): "Unmute" | "Mute"; protected _getVolumeText(): "muted" | "high" | "low" | undefined; render(): import("maverick.js").JSX.Element; } export interface MuteButtonAPI extends ToggleButtonAPI { } export interface MediaMuteButtonElement extends HTMLCustomElement<MuteButton> { }