UNPKG

react-native-pip-android-no-native-needed

Version:
30 lines 987 B
import { NativeEventEmitter } from 'react-native'; declare class PipHandler { EventEmitter: NativeEventEmitter | null; constructor(); onPipModeChanged(listener: (isModeEnabled: Boolean) => void): import("react-native").EmitterSubscription | undefined; /** * Call this method from any component to enter the pip mode. * This method accepts two integers, width and height, which have default values, * when invoked without passing them * * @param width * @param height * @example * ```js * import PipHandler, { usePipModeListener } from 'react-native-pip-android'; * * const isInPipMode = usePipModeListener(); * * function enterPipMode() { * * if (!isInPipMode) * PipHandler.enterPipMode(300, 214); * } * ``` */ enterPipMode(width?: number, height?: number): any; } declare const _default: PipHandler; export default _default; //# sourceMappingURL=PipHandler.d.ts.map