UNPKG

@videosdk.live/react-native-pip-android

Version:

Add picture in picture support to react native android application

37 lines 1.24 kB
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; setMeetingScreenState(value: boolean): any; getMeetingScreenState(): Promise<boolean>; setDefaultPipDimensions(width: number, height: number): any; getDefaultPipDimensions(): Promise<{ width: number; height: number; }>; } declare const _default: PipHandler; export default _default; //# sourceMappingURL=PipHandler.d.ts.map