@multiplayer-app/session-recorder-react-native 1.0.1-beta.9 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -1
- package/SessionRecorderNative.podspec +29 -3
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeModule.kt +1 -9
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativePackage.kt +1 -1
- package/ios/SessionRecorderNative-Bridging-Header.h +2 -0
- package/ios/{SessionRecorderNative.m → SessionRecorderNative.mm} +0 -1
- package/ios/SessionRecorderNative.swift +0 -13
- package/lib/module/NativeSessionRecorderModule.js +5 -0
- package/lib/module/NativeSessionRecorderModule.js.map +1 -0
- package/lib/module/NativeSessionRecorderModuleSpec.js +5 -0
- package/lib/module/NativeSessionRecorderModuleSpec.js.map +1 -0
- package/lib/module/NativeSessionRecorderNative.js +5 -0
- package/lib/module/NativeSessionRecorderNative.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/InitialPopover.js +1 -1
- package/lib/module/components/SessionRecorderWidget/InitialPopover.js.map +1 -1
- package/lib/module/context/SessionRecorderContext.js +8 -1
- package/lib/module/context/SessionRecorderContext.js.map +1 -1
- package/lib/module/index.js +0 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/SessionRecorderNative.js +9 -12
- package/lib/module/native/SessionRecorderNative.js.map +1 -1
- package/lib/module/otel/index.js +1 -1
- package/lib/module/otel/index.js.map +1 -1
- package/lib/module/recorder/index.js +1 -1
- package/lib/module/recorder/index.js.map +1 -1
- package/lib/module/services/screenMaskingService.js +1 -1
- package/lib/module/services/screenMaskingService.js.map +1 -1
- package/lib/module/session-recorder.js +11 -10
- package/lib/module/session-recorder.js.map +1 -1
- package/lib/typescript/src/NativeSessionRecorderModule.d.ts +25 -0
- package/lib/typescript/src/NativeSessionRecorderModule.d.ts.map +1 -0
- package/lib/typescript/src/NativeSessionRecorderModuleSpec.d.ts +25 -0
- package/lib/typescript/src/NativeSessionRecorderModuleSpec.d.ts.map +1 -0
- package/lib/typescript/src/NativeSessionRecorderNative.d.ts +25 -0
- package/lib/typescript/src/NativeSessionRecorderNative.d.ts.map +1 -0
- package/lib/typescript/src/context/SessionRecorderContext.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/SessionRecorderNative.d.ts +3 -1
- package/lib/typescript/src/native/SessionRecorderNative.d.ts.map +1 -1
- package/lib/typescript/src/recorder/index.d.ts.map +1 -1
- package/lib/typescript/src/services/screenMaskingService.d.ts +1 -1
- package/lib/typescript/src/services/screenMaskingService.d.ts.map +1 -1
- package/lib/typescript/src/session-recorder.d.ts +1 -1
- package/lib/typescript/src/session-recorder.d.ts.map +1 -1
- package/package.json +27 -7
- package/react-native.config.js +14 -0
- package/src/NativeSessionRecorderModule.ts +33 -0
- package/src/NativeSessionRecorderModuleSpec.ts +33 -0
- package/src/NativeSessionRecorderNative.ts +33 -0
- package/src/components/SessionRecorderWidget/InitialPopover.tsx +1 -1
- package/src/context/SessionRecorderContext.tsx +6 -1
- package/src/index.ts +0 -2
- package/src/native/SessionRecorderNative.ts +11 -13
- package/src/otel/index.ts +3 -3
- package/src/recorder/index.ts +1 -1
- package/src/services/screenMaskingService.ts +1 -3
- package/src/session-recorder.ts +16 -16
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeSpec.kt +0 -79
- package/ios/SessionRecorderNative.podspec +0 -22
- package/lib/module/SessionRecorderNativeSpec.js +0 -5
- package/lib/module/SessionRecorderNativeSpec.js.map +0 -1
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts +0 -41
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts.map +0 -1
- package/src/SessionRecorderNativeSpec.ts +0 -52
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Platform, NativeEventEmitter } from 'react-native';
|
|
2
|
-
import SessionRecorderNative, { type MaskingOptions, type Spec } from '../
|
|
2
|
+
import SessionRecorderNative, { type MaskingOptions, type Spec } from '../NativeSessionRecorderModule';
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
// Check if we're on web platform
|
|
@@ -57,18 +57,6 @@ const SafeSessionRecorderNative: Spec = {
|
|
|
57
57
|
return SessionRecorderNative.isGestureRecordingActive();
|
|
58
58
|
},
|
|
59
59
|
|
|
60
|
-
setGestureCallback(callback: (event: any) => void): void {
|
|
61
|
-
if (isWeb || !SessionRecorderNative) {
|
|
62
|
-
throw new Error('SessionRecorderNative is not available on web platform');
|
|
63
|
-
}
|
|
64
|
-
// Native side will also invoke callback if provided; also subscribe to events here
|
|
65
|
-
try {
|
|
66
|
-
SessionRecorderNative.setGestureCallback(callback as any);
|
|
67
|
-
} catch { }
|
|
68
|
-
eventEmitter?.removeAllListeners('onGestureDetected');
|
|
69
|
-
eventEmitter?.addListener('onGestureDetected', callback);
|
|
70
|
-
},
|
|
71
|
-
|
|
72
60
|
recordGesture(gestureType: string, x: number, y: number, target?: string, metadata?: any): void {
|
|
73
61
|
if (isWeb || !SessionRecorderNative) {
|
|
74
62
|
throw new Error('SessionRecorderNative is not available on web platform');
|
|
@@ -114,7 +102,17 @@ export interface NativeGestureEvent {
|
|
|
114
102
|
};
|
|
115
103
|
}
|
|
116
104
|
|
|
105
|
+
// Helper function to set gesture callback using event emitter pattern
|
|
106
|
+
export function setGestureCallback(callback: (event: NativeGestureEvent) => void): void {
|
|
107
|
+
if (isWeb || !SessionRecorderNative) {
|
|
108
|
+
throw new Error('SessionRecorderNative is not available on web platform');
|
|
109
|
+
}
|
|
110
|
+
eventEmitter?.removeAllListeners('onGestureDetected');
|
|
111
|
+
eventEmitter?.addListener('onGestureDetected', callback as any);
|
|
112
|
+
}
|
|
113
|
+
|
|
117
114
|
export default SafeSessionRecorderNative;
|
|
118
115
|
|
|
119
116
|
// Export event emitter for gesture events to maintain previous API
|
|
120
117
|
export const gestureEventEmitter = eventEmitter;
|
|
118
|
+
export type { MaskingOptions };
|
package/src/otel/index.ts
CHANGED
|
@@ -25,11 +25,11 @@ export class TracerReactNativeSDK {
|
|
|
25
25
|
private idGenerator?: SessionRecorderIdGenerator;
|
|
26
26
|
private exporter?: any;
|
|
27
27
|
|
|
28
|
-
constructor() {}
|
|
28
|
+
constructor() { }
|
|
29
29
|
|
|
30
30
|
private _setSessionId(
|
|
31
31
|
sessionId: string,
|
|
32
|
-
sessionType: SessionType = SessionType.
|
|
32
|
+
sessionType: SessionType = SessionType.MANUAL
|
|
33
33
|
) {
|
|
34
34
|
this.sessionId = sessionId;
|
|
35
35
|
this.idGenerator?.setSessionId(sessionId, sessionType);
|
|
@@ -85,7 +85,7 @@ export class TracerReactNativeSDK {
|
|
|
85
85
|
span.setAttribute('platform', 'react-native');
|
|
86
86
|
span.setAttribute('timestamp', Date.now());
|
|
87
87
|
},
|
|
88
|
-
onEnd: () => {},
|
|
88
|
+
onEnd: () => { },
|
|
89
89
|
shutdown: () => Promise.resolve(),
|
|
90
90
|
forceFlush: () => Promise.resolve(),
|
|
91
91
|
};
|
package/src/recorder/index.ts
CHANGED
|
@@ -16,7 +16,7 @@ export class RecorderReactNativeSDK implements EventRecorder {
|
|
|
16
16
|
private recordedEvents: eventWithTime[] = [];
|
|
17
17
|
private exporter: EventExporter;
|
|
18
18
|
private sessionId: string | null = null;
|
|
19
|
-
private sessionType: SessionType = SessionType.
|
|
19
|
+
private sessionType: SessionType = SessionType.MANUAL;
|
|
20
20
|
|
|
21
21
|
constructor() {
|
|
22
22
|
this.screenRecorder = new ScreenRecorder();
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import SessionRecorderNative, {
|
|
2
|
-
type MaskingOptions,
|
|
3
|
-
} from '../SessionRecorderNativeSpec';
|
|
1
|
+
import SessionRecorderNative, { type MaskingOptions } from '../native/SessionRecorderNative';
|
|
4
2
|
import { logger } from '../utils';
|
|
5
3
|
|
|
6
4
|
export interface ScreenMaskingConfig {
|
package/src/session-recorder.ts
CHANGED
|
@@ -29,12 +29,11 @@ import {
|
|
|
29
29
|
type StopSessionRequest,
|
|
30
30
|
} from './services/api.service';
|
|
31
31
|
|
|
32
|
-
type SessionRecorderEvents = 'state-change';
|
|
32
|
+
type SessionRecorderEvents = 'state-change' | 'init';
|
|
33
33
|
|
|
34
34
|
class SessionRecorder
|
|
35
35
|
extends Observable<SessionRecorderEvents>
|
|
36
|
-
implements ISessionRecorder, EventRecorder
|
|
37
|
-
{
|
|
36
|
+
implements ISessionRecorder, EventRecorder {
|
|
38
37
|
private _configs: SessionRecorderConfigs;
|
|
39
38
|
private _apiService = new ApiService();
|
|
40
39
|
private _tracer = new TracerReactNativeSDK();
|
|
@@ -64,7 +63,7 @@ class SessionRecorder
|
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
|
|
67
|
-
private _sessionType: SessionType = SessionType.
|
|
66
|
+
private _sessionType: SessionType = SessionType.MANUAL;
|
|
68
67
|
get sessionType(): SessionType {
|
|
69
68
|
return this._sessionType;
|
|
70
69
|
}
|
|
@@ -150,13 +149,13 @@ class SessionRecorder
|
|
|
150
149
|
if (isSessionActive(storedData.sessionObject, storedData.sessionType)) {
|
|
151
150
|
this.session = storedData.sessionObject;
|
|
152
151
|
this.sessionId = storedData.sessionId;
|
|
153
|
-
this.sessionType = storedData.sessionType || SessionType.
|
|
152
|
+
this.sessionType = storedData.sessionType || SessionType.MANUAL;
|
|
154
153
|
this.sessionState = storedData.sessionState;
|
|
155
154
|
} else {
|
|
156
155
|
this.session = null;
|
|
157
156
|
this.sessionId = null;
|
|
158
157
|
this.sessionState = null;
|
|
159
|
-
this.sessionType = SessionType.
|
|
158
|
+
this.sessionType = SessionType.MANUAL;
|
|
160
159
|
}
|
|
161
160
|
} catch (error) {
|
|
162
161
|
logger.error(
|
|
@@ -167,7 +166,7 @@ class SessionRecorder
|
|
|
167
166
|
this.session = null;
|
|
168
167
|
this.sessionId = null;
|
|
169
168
|
this.sessionState = null;
|
|
170
|
-
this.sessionType = SessionType.
|
|
169
|
+
this.sessionType = SessionType.MANUAL;
|
|
171
170
|
}
|
|
172
171
|
}
|
|
173
172
|
|
|
@@ -200,6 +199,7 @@ class SessionRecorder
|
|
|
200
199
|
) {
|
|
201
200
|
this._start();
|
|
202
201
|
}
|
|
202
|
+
this.emit('init', []);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
/**
|
|
@@ -232,7 +232,7 @@ class SessionRecorder
|
|
|
232
232
|
* @param session - the session to start
|
|
233
233
|
*/
|
|
234
234
|
public async start(
|
|
235
|
-
type: SessionType = SessionType.
|
|
235
|
+
type: SessionType = SessionType.MANUAL,
|
|
236
236
|
session?: ISession
|
|
237
237
|
): Promise<void> {
|
|
238
238
|
this._checkOperation('start');
|
|
@@ -251,7 +251,7 @@ class SessionRecorder
|
|
|
251
251
|
type === SessionType.CONTINUOUS &&
|
|
252
252
|
!this._configs?.showContinuousRecording
|
|
253
253
|
) {
|
|
254
|
-
type = SessionType.
|
|
254
|
+
type = SessionType.MANUAL;
|
|
255
255
|
}
|
|
256
256
|
logger.info('SessionRecorder', 'Starting session with type:', type);
|
|
257
257
|
this.sessionType = type;
|
|
@@ -273,7 +273,7 @@ class SessionRecorder
|
|
|
273
273
|
this._stop();
|
|
274
274
|
if (this.continuousRecording) {
|
|
275
275
|
await this._apiService.stopContinuousDebugSession(this.sessionId!);
|
|
276
|
-
this.sessionType = SessionType.
|
|
276
|
+
this.sessionType = SessionType.MANUAL;
|
|
277
277
|
} else {
|
|
278
278
|
const request: StopSessionRequest = {
|
|
279
279
|
sessionAttributes: { comment },
|
|
@@ -320,7 +320,7 @@ class SessionRecorder
|
|
|
320
320
|
this._stop();
|
|
321
321
|
if (this.continuousRecording) {
|
|
322
322
|
await this._apiService.stopContinuousDebugSession(this.sessionId!);
|
|
323
|
-
this.sessionType = SessionType.
|
|
323
|
+
this.sessionType = SessionType.MANUAL;
|
|
324
324
|
} else {
|
|
325
325
|
await this._apiService.cancelSession(this.sessionId!);
|
|
326
326
|
}
|
|
@@ -351,9 +351,9 @@ class SessionRecorder
|
|
|
351
351
|
stoppedAt: Date.now(),
|
|
352
352
|
name: this.sessionAttributes.userName
|
|
353
353
|
? `${this.sessionAttributes.userName}'s session on ${getFormattedDate(
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
Date.now(),
|
|
355
|
+
{ month: 'short', day: 'numeric' }
|
|
356
|
+
)}`
|
|
357
357
|
: `Session on ${getFormattedDate(Date.now())}`,
|
|
358
358
|
}
|
|
359
359
|
);
|
|
@@ -432,14 +432,14 @@ class SessionRecorder
|
|
|
432
432
|
if (session) {
|
|
433
433
|
session.sessionType = this.continuousRecording
|
|
434
434
|
? SessionType.CONTINUOUS
|
|
435
|
-
: SessionType.
|
|
435
|
+
: SessionType.MANUAL;
|
|
436
436
|
this._setupSessionAndStart(session, false);
|
|
437
437
|
}
|
|
438
438
|
} catch (error: any) {
|
|
439
439
|
this.error = error.message;
|
|
440
440
|
logger.error('SessionRecorder', 'Error creating session:', error.message);
|
|
441
441
|
if (this.continuousRecording) {
|
|
442
|
-
this.sessionType = SessionType.
|
|
442
|
+
this.sessionType = SessionType.MANUAL;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
package com.multiplayer.sessionrecordernative
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
|
-
import com.facebook.react.bridge.ReactMethod
|
|
6
|
-
import com.facebook.react.bridge.Promise
|
|
7
|
-
import com.facebook.react.bridge.Callback
|
|
8
|
-
import com.facebook.react.bridge.ReadableMap
|
|
9
|
-
import com.facebook.react.bridge.Arguments
|
|
10
|
-
import com.facebook.react.bridge.WritableMap
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Spec class for SessionRecorderNative TurboModule
|
|
14
|
-
* This class defines the interface that React Native expects for TurboModules
|
|
15
|
-
*/
|
|
16
|
-
class SessionRecorderNativeSpec(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
|
17
|
-
|
|
18
|
-
override fun getName(): String {
|
|
19
|
-
return NAME
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
companion object {
|
|
23
|
-
const val NAME = "SessionRecorderNative"
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Delegate to the actual implementation
|
|
27
|
-
private val implementation = SessionRecorderNativeModule(reactContext)
|
|
28
|
-
|
|
29
|
-
@ReactMethod
|
|
30
|
-
fun captureAndMask(promise: Promise) {
|
|
31
|
-
implementation.captureAndMask(promise)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@ReactMethod
|
|
35
|
-
fun captureAndMaskWithOptions(options: ReadableMap, promise: Promise) {
|
|
36
|
-
implementation.captureAndMaskWithOptions(options, promise)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@ReactMethod
|
|
40
|
-
fun startGestureRecording(promise: Promise) {
|
|
41
|
-
implementation.startGestureRecording(promise)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@ReactMethod
|
|
45
|
-
fun stopGestureRecording(promise: Promise) {
|
|
46
|
-
implementation.stopGestureRecording(promise)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@ReactMethod
|
|
50
|
-
fun isGestureRecordingActive(promise: Promise) {
|
|
51
|
-
implementation.isGestureRecordingActive(promise)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@ReactMethod
|
|
55
|
-
fun setGestureCallback(callback: Callback) {
|
|
56
|
-
implementation.setGestureCallback(callback)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@ReactMethod
|
|
60
|
-
fun recordGesture(
|
|
61
|
-
gestureType: String,
|
|
62
|
-
x: Double,
|
|
63
|
-
y: Double,
|
|
64
|
-
target: String?,
|
|
65
|
-
metadata: ReadableMap?
|
|
66
|
-
) {
|
|
67
|
-
implementation.recordGesture(gestureType, x, y, target, metadata)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@ReactMethod
|
|
71
|
-
fun addListener(eventName: String) {
|
|
72
|
-
implementation.addListener(eventName)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@ReactMethod
|
|
76
|
-
fun removeListeners(count: Int) {
|
|
77
|
-
implementation.removeListeners(count)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = "SessionRecorderNative"
|
|
7
|
-
s.version = package["version"]
|
|
8
|
-
s.summary = "Native session recorder module for React Native"
|
|
9
|
-
s.description = "A native module that provides session recording with automatic masking of sensitive UI elements"
|
|
10
|
-
s.homepage = "https://github.com/multiplayer-app/multiplayer-session-recorder-javascript"
|
|
11
|
-
s.license = "MIT"
|
|
12
|
-
s.authors = { "Multiplayer Software, Inc." => "https://www.multiplayer.app" }
|
|
13
|
-
s.platforms = { :ios => "12.0" }
|
|
14
|
-
s.source = { :git => "https://github.com/multiplayer-app/multiplayer-session-recorder-javascript.git", :tag => "#{s.version}" }
|
|
15
|
-
|
|
16
|
-
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
|
-
s.swift_version = "5.0"
|
|
18
|
-
s.requires_arc = true
|
|
19
|
-
|
|
20
|
-
s.dependency "React-Core"
|
|
21
|
-
s.dependency "React"
|
|
22
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","SessionRecorderNative"],"sourceRoot":"../../src","sources":["SessionRecorderNativeSpec.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,cAAc;AAmD5C,eAAeA,aAAa,CAACC,qBAAqB","ignoreList":[]}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export interface Spec {
|
|
2
|
-
/**
|
|
3
|
-
* Capture the current screen and apply masking to sensitive elements
|
|
4
|
-
* @returns Promise that resolves to base64 encoded image
|
|
5
|
-
*/
|
|
6
|
-
captureAndMask(): Promise<string>;
|
|
7
|
-
/**
|
|
8
|
-
* Capture the current screen and apply masking with custom options
|
|
9
|
-
* @param options Custom masking options
|
|
10
|
-
* @returns Promise that resolves to base64 encoded image
|
|
11
|
-
*/
|
|
12
|
-
captureAndMaskWithOptions(options: MaskingOptions): Promise<string>;
|
|
13
|
-
startGestureRecording(): Promise<void>;
|
|
14
|
-
stopGestureRecording(): Promise<void>;
|
|
15
|
-
isGestureRecordingActive(): Promise<boolean>;
|
|
16
|
-
setGestureCallback(callback: (event: any) => void): void;
|
|
17
|
-
recordGesture(gestureType: string, x: number, y: number, target?: string, metadata?: any): void;
|
|
18
|
-
addListener(eventName: string): void;
|
|
19
|
-
removeListeners(count: number): void;
|
|
20
|
-
}
|
|
21
|
-
export interface MaskingOptions {
|
|
22
|
-
/** Quality of the captured image (0.1 to 1.0, default: 0.3 for smaller file size) */
|
|
23
|
-
quality?: number;
|
|
24
|
-
/** Scale of the captured image (0.1 to 1.0, default: 1.0) */
|
|
25
|
-
scale?: number;
|
|
26
|
-
/** Whether to mask text inputs (UITextField, UITextView, React Native text components) */
|
|
27
|
-
maskTextInputs?: boolean;
|
|
28
|
-
/** Whether to mask images (UIImageView, React Native Image components) */
|
|
29
|
-
maskImages?: boolean;
|
|
30
|
-
/** Whether to mask buttons (UIButton) */
|
|
31
|
-
maskButtons?: boolean;
|
|
32
|
-
/** Whether to mask labels (UILabel) */
|
|
33
|
-
maskLabels?: boolean;
|
|
34
|
-
/** Whether to mask web views (WKWebView) */
|
|
35
|
-
maskWebViews?: boolean;
|
|
36
|
-
/** Whether to mask sandboxed views (system views that don't belong to current process) */
|
|
37
|
-
maskSandboxedViews?: boolean;
|
|
38
|
-
}
|
|
39
|
-
declare const _default: Spec;
|
|
40
|
-
export default _default;
|
|
41
|
-
//# sourceMappingURL=SessionRecorderNativeSpec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRecorderNativeSpec.d.ts","sourceRoot":"","sources":["../../../src/SessionRecorderNativeSpec.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC;;;;OAIG;IACH,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAGpE,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,kBAAkB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IACzD,aAAa,CACX,WAAW,EAAE,MAAM,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,GAAG,GACb,IAAI,CAAC;IACR,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0FAA0F;IAC1F,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;wBAEqD,IAAI;AAA1D,wBAA2D"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { NativeModules } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export interface Spec {
|
|
4
|
-
/**
|
|
5
|
-
* Capture the current screen and apply masking to sensitive elements
|
|
6
|
-
* @returns Promise that resolves to base64 encoded image
|
|
7
|
-
*/
|
|
8
|
-
captureAndMask(): Promise<string>;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Capture the current screen and apply masking with custom options
|
|
12
|
-
* @param options Custom masking options
|
|
13
|
-
* @returns Promise that resolves to base64 encoded image
|
|
14
|
-
*/
|
|
15
|
-
captureAndMaskWithOptions(options: MaskingOptions): Promise<string>;
|
|
16
|
-
|
|
17
|
-
// Gesture recording APIs
|
|
18
|
-
startGestureRecording(): Promise<void>;
|
|
19
|
-
stopGestureRecording(): Promise<void>;
|
|
20
|
-
isGestureRecordingActive(): Promise<boolean>;
|
|
21
|
-
setGestureCallback(callback: (event: any) => void): void;
|
|
22
|
-
recordGesture(
|
|
23
|
-
gestureType: string,
|
|
24
|
-
x: number,
|
|
25
|
-
y: number,
|
|
26
|
-
target?: string,
|
|
27
|
-
metadata?: any
|
|
28
|
-
): void;
|
|
29
|
-
addListener(eventName: string): void;
|
|
30
|
-
removeListeners(count: number): void;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface MaskingOptions {
|
|
34
|
-
/** Quality of the captured image (0.1 to 1.0, default: 0.3 for smaller file size) */
|
|
35
|
-
quality?: number;
|
|
36
|
-
/** Scale of the captured image (0.1 to 1.0, default: 1.0) */
|
|
37
|
-
scale?: number;
|
|
38
|
-
/** Whether to mask text inputs (UITextField, UITextView, React Native text components) */
|
|
39
|
-
maskTextInputs?: boolean;
|
|
40
|
-
/** Whether to mask images (UIImageView, React Native Image components) */
|
|
41
|
-
maskImages?: boolean;
|
|
42
|
-
/** Whether to mask buttons (UIButton) */
|
|
43
|
-
maskButtons?: boolean;
|
|
44
|
-
/** Whether to mask labels (UILabel) */
|
|
45
|
-
maskLabels?: boolean;
|
|
46
|
-
/** Whether to mask web views (WKWebView) */
|
|
47
|
-
maskWebViews?: boolean;
|
|
48
|
-
/** Whether to mask sandboxed views (system views that don't belong to current process) */
|
|
49
|
-
maskSandboxedViews?: boolean;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export default NativeModules.SessionRecorderNative as Spec;
|