UNPKG

@exmg/livery

Version:

Ex Machina Group Livery Web SDK.

46 lines (45 loc) 1.4 kB
import { PresentationMode } from './PresentationMode'; declare global { interface Document { webkitCancelFullScreen?: () => void; webkitFullscreenEnabled?: boolean; webkitIsFullScreen?: boolean; } interface Element { webkitRequestFullscreen?: () => void; } } /** * This class adapts to different browser APIs for making an element fullscreen. * * If no fullscreen APIs are found to be supported by this browser on this element * then this class will instead add a `fullscreen` class to the element when it is * requested to make that fullscreen. * This will also lock the body to prevent it from scrolling underneath the element. * If there is no fullscreen API available and the player is also currently embedded, * `isSupported()` will return false. * * This requires CSS like the following: * ```css * fullscreen { * position: fixed, * overflow: hidden; * z-index: 1000; * top: 0; * right: 0; * bottom: 0; * left: 0; * width: 100% !important; * height: 100% !important; * } * ``` */ export declare class FullscreenMode extends PresentationMode { private root; constructor(element: Element, root?: Document | ShadowRoot); static isSupported(element: Element): boolean; private static isEmbedded; exit(): Promise<void>; request(): Promise<void>; protected isActive(): boolean; }