import { type ContextConsumerController, DeferredPromise, DisposalBin } from '@vidstack/foundation'; import { type CSSResultGroup, LitElement, type PropertyValues } from 'lit'; import { type Ref } from 'lit/directives/ref.js'; export declare type GestureType = keyof GlobalEventHandlersEventMap; export declare type GestureAction = 'play' | 'pause' | 'mute' | 'unmute' | 'enter-fullscreen' | 'exit-fullscreen' | `seek:${number}` | `toggle:${'paused' | 'muted' | 'fullscreen'}`; /** * This element enables 'actions' to be performed on the media provider based on user gestures. * * The `GestureElement` can be used to build features such as: * * - Click the player to toggle playback. * - Double-click the player to toggle fullscreen. * - Tap the sides of the player to seek forwards or backwards. * - Pause media when the user's mouse leaves the player. * * This is a simple list, but it should give you an idea on when to reach for this element. * * @experimental * @tagname vds-gesture * @example * ```html * * * * * * ``` */ export declare class GestureElement extends LitElement { static get styles(): CSSResultGroup; protected _disposal: DisposalBin; protected _mediaContainerConsumer: ContextConsumerController>; protected get _mediaContainer(): HTMLElement | undefined; /** Pending actions that belong to the same container as this gesture element. */ protected get _pendingActions(): Map]> | undefined; /** Pending action that belongs to this gesture element. */ protected get _pendingAction(): [event: Event, promise: DeferredPromise] | undefined; /** * The DOM event type that will trigger this gesture. It can be any valid DOM event type. * * @example 'pointerdown' * @example 'mouseleave' * @example 'touchstart' */ type?: GestureType; /** * The number of times a gesture event `type` should be repeated before the action is * performed. Keep in mind that the provided value is a multiplier, and not a constant. Thus, if * you want an event to occur twice before the action is performed, this will be a single * repetition (eg: value of `1`). * * @default 0 * @example 0 - wait for event to occur once. * @example 1 - wait for event to occur twice. * @example 2 - wait for event to occur thrice. */ repeat: number; /** * The level of importance given to this gesture. If multiple gestures occur at the same time, * the priority will determine which gesture actions are performed. Higher priority gestures in * a single batch will cause lower level priorities to be ignored. * *💡 A lower priority value means greater prioritization (eg: `0 > 1 > 2 > ... > 100`). * * @default 10 */ priority: number; /** * An action describes the type of media request event that will be dispatched, which will * ultimately perform some operation on the player (eg: fullscreen, mute, etc.). * * @example 'play' * @example 'seek:30' * @example 'seek:-30' * @example 'toggle:paused' */ action?: GestureAction; connectedCallback(): void; protected willUpdate(changedProperties: PropertyValues): void; disconnectedCallback(): void; performAction(event?: Event): void; protected _attachListener(): void; protected _validateEvent(event: Event): boolean; protected _mediaCurrentTime: number; protected _subscribeToSeekStore(): void; protected _currentToggleState: boolean; protected _mediaStoreConsumer: ContextConsumerController; protected get _mediaStore(): import("../../media").WritableMediaStoreRecord; protected _getToggleEventType(): string; protected _subscribeToToggleStore(): void; } //# sourceMappingURL=GestureElement.d.ts.map