UNPKG

@aidenlx/player

Version:

Headless web components that make integrating media on the a web a breeze.

65 lines 2.45 kB
/// <reference types="@vidstack/foundation/globals" /> import { DisposalBin, LogDispatcher } from '@vidstack/foundation'; import { type ReactiveElement } from 'lit'; export declare type VideoPresentationControllerHost = ReactiveElement & { readonly videoElement: HTMLVideoElement | undefined; }; /** * Contains the logic for handling presentation modes on Safari. This class is used by * the `VideoFullscreenController` as a fallback when the native Fullscreen API is not * available (ie: iOS Safari). * * @example * ```ts * import { LitElement } from 'lit'; * import { VideoPresentationController } from '@vidstack/player'; * * class MyElement extends LitElement { * get videoElement(): HTMLVideoElement | undefined { * return this.videoEl; * } * * presentationController = new VideoPresentationController(this); * } * ``` */ export declare class VideoPresentationController { protected readonly _host: VideoPresentationControllerHost; protected readonly _listenerDisposal: DisposalBin; protected readonly _logger: LogDispatcher | undefined; constructor(_host: VideoPresentationControllerHost); protected _handleHostDisconnected(): void; /** * The current presentation mode, possible values include `inline`, `picture-in-picture` and * `fullscreen`. Only available in Safari. * * @default undefined * @link https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1631913-webkitpresentationmode */ get presentationMode(): WebKitPresentationMode | undefined; /** * Whether the current `presentationMode` is `inline`. */ get isInlineMode(): boolean; /** * Whether the current `presentationMode` is `picture-in-picture`. */ get isPictureInPictureMode(): boolean; /** * Whether the current `presentationMode` is `fullscreen`. */ get isFullscreenMode(): boolean; /** * Whether the presentation mode API is available. * * @link https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1628805-webkitsupportsfullscreen */ get isSupported(): boolean; setPresentationMode(mode: WebKitPresentationMode): void; /** * @returns Stop listening function. */ protected _addPresentationModeChangeEventListener(): () => void; protected _handlePresentationModeChange(event: Event): void; } //# sourceMappingURL=VideoPresentationController.d.ts.map