fix: support web
This commit is contained in:
parent
fe7520bde9
commit
ff9c4424ad
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-capture-protection",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.1",
|
||||
"description": "🛡️ A React Native library to prevent and detect for screen capture, screenshots and app switcher for enhanced security. Fully compatible with both Expo and CLI.",
|
||||
"main": "./lib/commonjs/index.js",
|
||||
"module": "./lib/module/index.js",
|
||||
|
||||
16
src/spec/NativeCaptureProtection.ts
Normal file
16
src/spec/NativeCaptureProtection.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import type { TurboModule } from 'react-native';
|
||||
import { TurboModuleRegistry } from 'react-native';
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
allow: () => Promise<void>;
|
||||
prevent: () => Promise<void>;
|
||||
hasListener: () => Promise<boolean>;
|
||||
protectionStatus: () => Promise<boolean>;
|
||||
isScreenRecording: () => Promise<boolean | undefined>;
|
||||
requestPermission: () => Promise<boolean>;
|
||||
checkPermission: () => Promise<boolean>;
|
||||
addListener: (eventName: string) => void;
|
||||
removeListeners: (count: number) => void;
|
||||
}
|
||||
|
||||
export default TurboModuleRegistry.getEnforcing<Spec>('CaptureProtection');
|
||||
Loading…
Reference in New Issue
Block a user