UNPKG

vidstack

Version:

Build awesome media experiences on the web.

36 lines (35 loc) 1.38 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-play-button': MediaPlayButtonElement; } } /** * A button for toggling the playback state (play/pause) of the current media. * * @docs {@link https://www.vidstack.io/docs/player/components/buttons/play-button} * @slot play - Used to override the default play icon. * @slot replay - Used to override the default replay icon. * @slot pause - Used to override the default pause icon. * @example * ```html * <media-play-button></media-play-button> * ``` */ export declare class PlayButton extends ToggleButton { static el: import("maverick.js/element").CustomElementDefinition<PlayButtonAPI>; protected _media: MediaContext; protected _keyShortcut: MediaKeyShortcut; protected onAttach(el: HTMLElement): void; protected _onPress(event: Event): void; protected _isPressed(): boolean; protected _getLabel(): "Play" | "Pause"; render(): import("maverick.js").JSX.Element; } export interface PlayButtonAPI extends ToggleButtonAPI { } export interface MediaPlayButtonElement extends HTMLCustomElement<PlayButton> { }