import { type ReactiveElement } from 'lit'; import { LogDispatcher } from '../logger'; import { DisposalBin } from '../utils/events'; import { ScreenOrientation, ScreenOrientationLock } from './ScreenOrientation'; /** * Contains the logic for managing the window's screen orientation. * * @example * ```ts * import { LitElement } from 'lit'; * import { ScreenOrientationController } from '@vidstack/player'; * * class MyElement extends LitElement { * screenOrientationController = new ScreenOrientationController(this); * } * ``` */ export declare class ScreenOrientationController { protected readonly _host: ReactiveElement; protected readonly _listenerDisposal: DisposalBin; protected _screenOrientation?: ScreenOrientation; protected _isScreenOrientationLocked: boolean; protected readonly _logger: LogDispatcher | undefined; constructor(_host: ReactiveElement); protected _handleHostConnected(): Promise; /** * Dispose of any event listeners and unlock screen orientation (if locked). */ protected _handleHostDisconnected(): Promise; /** * The current screen orientation. It will return `undefined` if the Screen Orientation API * is not available. */ get currentOrientation(): ScreenOrientation | undefined; /** * Whether the native Screen Orientation API is available. */ get canOrient(): boolean; /** * Whether the screen orientation is currently locked. * * @default false */ get isLocked(): boolean; /** * Locks the orientation of the player to the desired orientation type using the * Screen Orientation API. This method will throw an error if the API is unavailable. * * @param lockType - The screen lock orientation type. * @link https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation * @see https://w3c.github.io/screen-orientation */ lock(lockType: ScreenOrientationLock): Promise; /** * Unlocks the orientation of the player to it's default state using the Screen Orientation * API. This method will throw an error if the API is unavailable. * * @link https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation * @see https://w3c.github.io/screen-orientation */ unlock(): Promise; protected _addScreenOrientationEventListeners(): void; /** * @returns Stop listening function. */ protected _addScreenOrientationChangeEventListener(): () => void; protected _handleOrientationChange(event: Event): void; protected _updateScreenOrientation(): void; /** * @throws {Error} - Will throw if Screen Orientation API is unavailable. */ protected _throwIfScreenOrientationUnavailable(): void; } //# sourceMappingURL=ScreenOrientationController.d.ts.map