@jaydhimar/react-native-pip
Version:
A React Native library for Picture-in-Picture mode with support for both iOS and Android platforms.
23 lines • 693 B
TypeScript
import type { TurboModule } from 'react-native';
export interface PipConfig {
aspectRatio?: {
width: number;
height: number;
};
autoEnterOnBackground?: boolean;
}
export interface PipEvents {
onEnterPip?: () => void;
onExitPip?: () => void;
onError?: (error: string) => void;
}
export interface Spec extends TurboModule {
isPipSupported(): Promise<boolean>;
enterPictureInPicture(config?: PipConfig): Promise<boolean>;
exitPictureInPicture(): Promise<boolean>;
addListener(eventType: string): void;
removeListeners(count: number): void;
}
declare const _default: Spec;
export default _default;
//# sourceMappingURL=NativePip.d.ts.map