@multiplayer-app/session-recorder-react-native 1.0.1-beta.1 → 1.0.1-beta.11
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/LICENSE +1 -2
- package/README.md +296 -156
- package/SessionRecorderNative.podspec +35 -14
- package/android/build.gradle +50 -54
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeConfig.kt +52 -0
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeModule.kt +861 -0
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativePackage.kt +33 -0
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeSpec.kt +79 -0
- package/android/src/main/java/com/sessionrecordernative/model/TargetInfo.kt +9 -0
- package/android/src/main/java/com/sessionrecordernative/util/ViewUtils.kt +72 -0
- package/ios/GestureTargetFinder.swift +50 -0
- package/ios/SessionRecorderNative-Bridging-Header.h +2 -0
- package/ios/{GestureRecorderNative.m → SessionRecorderNative.mm} +17 -6
- package/ios/SessionRecorderNative.swift +256 -4
- package/lib/module/SessionRecorderNativeSpec.js +5 -0
- package/lib/module/SessionRecorderNativeSpec.js.map +1 -0
- package/lib/module/components/ScreenRecorderView/ScreenRecorderView.js +23 -0
- package/lib/module/components/ScreenRecorderView/ScreenRecorderView.js.map +1 -0
- package/lib/module/components/ScreenRecorderView/index.js +4 -0
- package/lib/module/components/ScreenRecorderView/index.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/ErrorBanner.js +64 -0
- package/lib/module/components/SessionRecorderWidget/ErrorBanner.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/FinalPopover.js +74 -0
- package/lib/module/components/SessionRecorderWidget/FinalPopover.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/FloatingButton.js +191 -0
- package/lib/module/components/SessionRecorderWidget/FloatingButton.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/InitialPopover.js +138 -0
- package/lib/module/components/SessionRecorderWidget/InitialPopover.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/ModalContainer.js +177 -0
- package/lib/module/components/SessionRecorderWidget/ModalContainer.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/ModalHeader.js +27 -0
- package/lib/module/components/SessionRecorderWidget/ModalHeader.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/SessionRecorderWidget.js +133 -0
- package/lib/module/components/SessionRecorderWidget/SessionRecorderWidget.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/icons.js +93 -0
- package/lib/module/components/SessionRecorderWidget/icons.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/index.js +5 -0
- package/lib/module/components/SessionRecorderWidget/index.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/styles.js +173 -0
- package/lib/module/components/SessionRecorderWidget/styles.js.map +1 -0
- package/lib/module/components/index.js +5 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/config/constants.js +42 -0
- package/lib/module/config/constants.js.map +1 -0
- package/lib/module/config/defaults.js +81 -0
- package/lib/module/config/defaults.js.map +1 -0
- package/lib/module/config/index.js +9 -0
- package/lib/module/config/index.js.map +1 -0
- package/lib/module/config/masking.js +35 -0
- package/lib/module/config/masking.js.map +1 -0
- package/lib/module/config/session-recorder.js +44 -0
- package/lib/module/config/session-recorder.js.map +1 -0
- package/lib/module/config/validators.js +28 -0
- package/lib/module/config/validators.js.map +1 -0
- package/lib/module/config/widget.js +35 -0
- package/lib/module/config/widget.js.map +1 -0
- package/lib/module/context/SessionRecorderContext.js +93 -0
- package/lib/module/context/SessionRecorderContext.js.map +1 -0
- package/lib/module/context/SessionRecorderStore.js +12 -0
- package/lib/module/context/SessionRecorderStore.js.map +1 -0
- package/lib/module/context/useSessionRecorderStore.js +20 -0
- package/lib/module/context/useSessionRecorderStore.js.map +1 -0
- package/lib/module/context/useStoreSelector.js +27 -0
- package/lib/module/context/useStoreSelector.js.map +1 -0
- package/lib/module/index.js +16 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/native/SessionRecorderNative.js +79 -0
- package/lib/module/native/SessionRecorderNative.js.map +1 -0
- package/lib/module/native/index.js +4 -0
- package/lib/module/native/index.js.map +1 -0
- package/lib/module/otel/helpers.js +218 -0
- package/lib/module/otel/helpers.js.map +1 -0
- package/lib/module/otel/index.js +95 -0
- package/lib/module/otel/index.js.map +1 -0
- package/lib/module/otel/instrumentations/index.js +102 -0
- package/lib/module/otel/instrumentations/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/patch/index.js +4 -0
- package/lib/module/patch/index.js.map +1 -0
- package/lib/module/patch/xhr.js +116 -0
- package/lib/module/patch/xhr.js.map +1 -0
- package/lib/module/recorder/eventExporter.js +130 -0
- package/lib/module/recorder/eventExporter.js.map +1 -0
- package/lib/module/recorder/gestureRecorder.js +641 -0
- package/lib/module/recorder/gestureRecorder.js.map +1 -0
- package/lib/module/recorder/index.js +168 -0
- package/lib/module/recorder/index.js.map +1 -0
- package/lib/module/recorder/navigationTracker.js +228 -0
- package/lib/module/recorder/navigationTracker.js.map +1 -0
- package/lib/module/recorder/screenRecorder.js +495 -0
- package/lib/module/recorder/screenRecorder.js.map +1 -0
- package/lib/module/services/api.service.js +149 -0
- package/lib/module/services/api.service.js.map +1 -0
- package/lib/module/services/network.service.js +178 -0
- package/lib/module/services/network.service.js.map +1 -0
- package/lib/module/services/screenMaskingService.js +107 -0
- package/lib/module/services/screenMaskingService.js.map +1 -0
- package/lib/module/services/storage.service.js +179 -0
- package/lib/module/services/storage.service.js.map +1 -0
- package/lib/module/session-recorder.js +541 -0
- package/lib/module/session-recorder.js.map +1 -0
- package/lib/module/types/configs.js +4 -0
- package/lib/module/types/configs.js.map +1 -0
- package/lib/module/types/expo-constants.d.js +2 -0
- package/lib/module/types/expo-constants.d.js.map +1 -0
- package/lib/module/types/index.js +11 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/session-recorder.js +68 -0
- package/lib/module/types/session-recorder.js.map +1 -0
- package/lib/module/types/session.js +9 -0
- package/lib/module/types/session.js.map +1 -0
- package/lib/module/utils/app-metadata.js +28 -0
- package/lib/module/utils/app-metadata.js.map +1 -0
- package/lib/module/utils/constants.optional.expo.js +6 -0
- package/lib/module/utils/constants.optional.expo.js.map +1 -0
- package/lib/module/utils/constants.optional.js +8 -0
- package/lib/module/utils/constants.optional.js.map +1 -0
- package/lib/module/utils/createStore.js +27 -0
- package/lib/module/utils/createStore.js.map +1 -0
- package/lib/module/utils/index.js +11 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/logger.js +185 -0
- package/lib/module/utils/logger.js.map +1 -0
- package/lib/module/utils/platform.js +340 -0
- package/lib/module/utils/platform.js.map +1 -0
- package/lib/module/utils/request-utils.js +58 -0
- package/lib/module/utils/request-utils.js.map +1 -0
- package/lib/module/utils/rrweb-events.js +276 -0
- package/lib/module/utils/rrweb-events.js.map +1 -0
- package/lib/module/utils/session.js +21 -0
- package/lib/module/utils/session.js.map +1 -0
- package/lib/module/utils/shallowEqual.js +17 -0
- package/lib/module/utils/shallowEqual.js.map +1 -0
- package/lib/module/utils/time.js +17 -0
- package/lib/module/utils/time.js.map +1 -0
- package/lib/module/utils/type-utils.js +69 -0
- package/lib/module/utils/type-utils.js.map +1 -0
- package/lib/module/version.js +4 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/{dist/native/SessionRecorderNativeTurboSpec.d.ts → lib/typescript/src/SessionRecorderNativeSpec.d.ts} +14 -6
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts.map +1 -0
- package/lib/typescript/src/components/ScreenRecorderView/ScreenRecorderView.d.ts +6 -0
- package/lib/typescript/src/components/ScreenRecorderView/ScreenRecorderView.d.ts.map +1 -0
- package/lib/typescript/src/components/ScreenRecorderView/index.d.ts +2 -0
- package/lib/typescript/src/components/ScreenRecorderView/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/ErrorBanner.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/ErrorBanner.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/FinalPopover.d.ts +2 -1
- package/lib/typescript/src/components/SessionRecorderWidget/FinalPopover.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/FloatingButton.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/FloatingButton.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/InitialPopover.d.ts +2 -1
- package/lib/typescript/src/components/SessionRecorderWidget/InitialPopover.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/ModalContainer.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/ModalContainer.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/ModalHeader.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/ModalHeader.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/SessionRecorderWidget.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/SessionRecorderWidget.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/icons.d.ts +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/icons.d.ts.map +1 -0
- package/lib/typescript/src/components/SessionRecorderWidget/index.d.ts +3 -0
- package/lib/typescript/src/components/SessionRecorderWidget/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/components/SessionRecorderWidget/styles.d.ts +4 -3
- package/lib/typescript/src/components/SessionRecorderWidget/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +3 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/constants.d.ts +1 -0
- package/lib/typescript/src/config/constants.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/defaults.d.ts +2 -1
- package/lib/typescript/src/config/defaults.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/index.d.ts +1 -0
- package/lib/typescript/src/config/index.d.ts.map +1 -0
- package/lib/typescript/src/config/masking.d.ts +3 -0
- package/lib/typescript/src/config/masking.d.ts.map +1 -0
- package/lib/typescript/src/config/session-recorder.d.ts +3 -0
- package/lib/typescript/src/config/session-recorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/validators.d.ts +1 -0
- package/lib/typescript/src/config/validators.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/config/widget.d.ts +2 -1
- package/lib/typescript/src/config/widget.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/context/SessionRecorderContext.d.ts +3 -2
- package/lib/typescript/src/context/SessionRecorderContext.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/context/SessionRecorderStore.d.ts +2 -1
- package/lib/typescript/src/context/SessionRecorderStore.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/context/useSessionRecorderStore.d.ts +4 -3
- package/lib/typescript/src/context/useSessionRecorderStore.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/context/useStoreSelector.d.ts +2 -1
- package/lib/typescript/src/context/useStoreSelector.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/native/SessionRecorderNative.d.ts +27 -0
- package/lib/typescript/src/native/SessionRecorderNative.d.ts.map +1 -0
- package/lib/typescript/src/native/index.d.ts +2 -0
- package/lib/typescript/src/native/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/otel/helpers.d.ts +3 -2
- package/lib/typescript/src/otel/helpers.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/otel/index.d.ts +2 -2
- package/lib/typescript/src/otel/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/otel/instrumentations/index.d.ts +2 -1
- package/lib/typescript/src/otel/instrumentations/index.d.ts.map +1 -0
- package/lib/typescript/src/patch/index.d.ts +2 -0
- package/lib/typescript/src/patch/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/patch/xhr.d.ts +1 -0
- package/lib/typescript/src/patch/xhr.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/eventExporter.d.ts +2 -1
- package/lib/typescript/src/recorder/eventExporter.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/gestureRecorder.d.ts +3 -2
- package/lib/typescript/src/recorder/gestureRecorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/index.d.ts +3 -2
- package/lib/typescript/src/recorder/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/navigationTracker.d.ts +2 -1
- package/lib/typescript/src/recorder/navigationTracker.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/recorder/screenRecorder.d.ts +4 -4
- package/lib/typescript/src/recorder/screenRecorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/services/api.service.d.ts +2 -1
- package/lib/typescript/src/services/api.service.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/services/network.service.d.ts +1 -0
- package/lib/typescript/src/services/network.service.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/services/screenMaskingService.d.ts +2 -1
- package/lib/typescript/src/services/screenMaskingService.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/services/storage.service.d.ts +2 -1
- package/lib/typescript/src/services/storage.service.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/session-recorder.d.ts +3 -2
- package/lib/typescript/src/session-recorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/types/configs.d.ts +3 -2
- package/lib/typescript/src/types/configs.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/types/index.d.ts +1 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/types/session-recorder.d.ts +7 -6
- package/lib/typescript/src/types/session-recorder.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/types/session.d.ts +1 -0
- package/lib/typescript/src/types/session.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/app-metadata.d.ts +1 -0
- package/lib/typescript/src/utils/app-metadata.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/constants.optional.d.ts +1 -0
- package/lib/typescript/src/utils/constants.optional.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/constants.optional.expo.d.ts +1 -0
- package/lib/typescript/src/utils/constants.optional.expo.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/createStore.d.ts +1 -0
- package/lib/typescript/src/utils/createStore.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts +8 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/logger.d.ts +2 -1
- package/lib/typescript/src/utils/logger.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/platform.d.ts +2 -1
- package/lib/typescript/src/utils/platform.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/request-utils.d.ts +1 -0
- package/lib/typescript/src/utils/request-utils.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/rrweb-events.d.ts +2 -1
- package/lib/typescript/src/utils/rrweb-events.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/session.d.ts +1 -0
- package/lib/typescript/src/utils/session.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/shallowEqual.d.ts +1 -0
- package/lib/typescript/src/utils/shallowEqual.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/time.d.ts +1 -0
- package/lib/typescript/src/utils/time.d.ts.map +1 -0
- package/{dist → lib/typescript/src}/utils/type-utils.d.ts +1 -0
- package/lib/typescript/src/utils/type-utils.d.ts.map +1 -0
- package/lib/typescript/src/version.d.ts +2 -0
- package/lib/typescript/src/version.d.ts.map +1 -0
- package/package.json +154 -37
- package/react-native.config.js +14 -0
- package/src/SessionRecorderNativeSpec.ts +33 -0
- package/src/components/ScreenRecorderView/ScreenRecorderView.tsx +20 -0
- package/src/components/ScreenRecorderView/index.ts +1 -0
- package/src/components/SessionRecorderWidget/ErrorBanner.tsx +58 -0
- package/src/components/SessionRecorderWidget/FinalPopover.tsx +96 -0
- package/src/components/SessionRecorderWidget/FloatingButton.tsx +176 -0
- package/src/components/SessionRecorderWidget/InitialPopover.tsx +167 -0
- package/src/components/SessionRecorderWidget/ModalContainer.tsx +189 -0
- package/src/components/SessionRecorderWidget/ModalHeader.tsx +26 -0
- package/src/components/SessionRecorderWidget/SessionRecorderWidget.tsx +150 -0
- package/src/components/SessionRecorderWidget/icons.tsx +80 -0
- package/src/components/SessionRecorderWidget/index.ts +3 -0
- package/src/components/SessionRecorderWidget/styles.ts +168 -0
- package/src/config/constants.ts +67 -0
- package/src/config/defaults.ts +105 -0
- package/src/config/index.ts +6 -0
- package/src/config/masking.ts +60 -0
- package/src/config/session-recorder.ts +87 -0
- package/src/config/validators.ts +54 -0
- package/src/config/widget.ts +47 -0
- package/src/context/SessionRecorderContext.tsx +138 -0
- package/src/context/SessionRecorderStore.ts +22 -0
- package/src/context/useSessionRecorderStore.ts +34 -0
- package/src/context/useStoreSelector.ts +36 -0
- package/src/index.ts +13 -0
- package/src/native/SessionRecorderNative.ts +120 -0
- package/src/native/index.ts +5 -0
- package/src/otel/helpers.ts +290 -0
- package/src/otel/index.ts +132 -0
- package/src/otel/instrumentations/index.ts +118 -0
- package/src/patch/xhr.ts +148 -0
- package/src/recorder/eventExporter.ts +150 -0
- package/src/recorder/gestureRecorder.ts +828 -0
- package/src/recorder/index.ts +203 -0
- package/src/recorder/navigationTracker.ts +268 -0
- package/src/recorder/screenRecorder.ts +600 -0
- package/src/services/api.service.ts +216 -0
- package/src/services/network.service.ts +191 -0
- package/src/services/screenMaskingService.ts +153 -0
- package/src/services/storage.service.ts +248 -0
- package/src/session-recorder.ts +647 -0
- package/src/types/configs.ts +118 -0
- package/src/types/expo-constants.d.ts +7 -0
- package/src/types/index.ts +27 -0
- package/src/types/session-recorder.ts +381 -0
- package/src/types/session.ts +65 -0
- package/src/utils/app-metadata.ts +31 -0
- package/src/utils/constants.optional.expo.ts +5 -0
- package/src/utils/constants.optional.ts +18 -0
- package/src/utils/createStore.ts +32 -0
- package/{dist/utils/index.d.ts → src/utils/index.ts} +1 -0
- package/src/utils/logger.ts +245 -0
- package/src/utils/platform.ts +401 -0
- package/src/utils/request-utils.ts +61 -0
- package/src/utils/rrweb-events.ts +329 -0
- package/src/utils/session.ts +22 -0
- package/src/utils/shallowEqual.ts +20 -0
- package/src/utils/time.ts +20 -0
- package/src/utils/type-utils.ts +75 -0
- package/src/version.ts +1 -0
- package/copy-react-native-dist.sh +0 -56
- package/dist/components/ScreenRecorderView/ScreenRecorderView.d.ts +0 -5
- package/dist/components/ScreenRecorderView/ScreenRecorderView.js +0 -1
- package/dist/components/ScreenRecorderView/ScreenRecorderView.js.map +0 -1
- package/dist/components/ScreenRecorderView/index.d.ts +0 -1
- package/dist/components/ScreenRecorderView/index.js +0 -1
- package/dist/components/ScreenRecorderView/index.js.map +0 -1
- package/dist/components/SessionRecorderWidget/ErrorBanner.js +0 -1
- package/dist/components/SessionRecorderWidget/ErrorBanner.js.map +0 -1
- package/dist/components/SessionRecorderWidget/FinalPopover.js +0 -1
- package/dist/components/SessionRecorderWidget/FinalPopover.js.map +0 -1
- package/dist/components/SessionRecorderWidget/FloatingButton.js +0 -1
- package/dist/components/SessionRecorderWidget/FloatingButton.js.map +0 -1
- package/dist/components/SessionRecorderWidget/InitialPopover.js +0 -1
- package/dist/components/SessionRecorderWidget/InitialPopover.js.map +0 -1
- package/dist/components/SessionRecorderWidget/ModalContainer.js +0 -1
- package/dist/components/SessionRecorderWidget/ModalContainer.js.map +0 -1
- package/dist/components/SessionRecorderWidget/ModalHeader.js +0 -1
- package/dist/components/SessionRecorderWidget/ModalHeader.js.map +0 -1
- package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js +0 -1
- package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js.map +0 -1
- package/dist/components/SessionRecorderWidget/icons.js +0 -1
- package/dist/components/SessionRecorderWidget/icons.js.map +0 -1
- package/dist/components/SessionRecorderWidget/index.d.ts +0 -2
- package/dist/components/SessionRecorderWidget/index.js +0 -1
- package/dist/components/SessionRecorderWidget/index.js.map +0 -1
- package/dist/components/SessionRecorderWidget/styles.js +0 -1
- package/dist/components/SessionRecorderWidget/styles.js.map +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/config/constants.js +0 -1
- package/dist/config/constants.js.map +0 -1
- package/dist/config/defaults.js +0 -1
- package/dist/config/defaults.js.map +0 -1
- package/dist/config/index.js +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/masking.d.ts +0 -2
- package/dist/config/masking.js +0 -1
- package/dist/config/masking.js.map +0 -1
- package/dist/config/session-recorder.d.ts +0 -2
- package/dist/config/session-recorder.js +0 -1
- package/dist/config/session-recorder.js.map +0 -1
- package/dist/config/validators.js +0 -1
- package/dist/config/validators.js.map +0 -1
- package/dist/config/widget.js +0 -1
- package/dist/config/widget.js.map +0 -1
- package/dist/context/SessionRecorderContext.js +0 -1
- package/dist/context/SessionRecorderContext.js.map +0 -1
- package/dist/context/SessionRecorderStore.js +0 -1
- package/dist/context/SessionRecorderStore.js.map +0 -1
- package/dist/context/useSessionRecorderStore.js +0 -1
- package/dist/context/useSessionRecorderStore.js.map +0 -1
- package/dist/context/useStoreSelector.js +0 -1
- package/dist/context/useStoreSelector.js.map +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +0 -1
- package/dist/native/GestureRecorderNative.d.ts +0 -57
- package/dist/native/GestureRecorderNative.js +0 -1
- package/dist/native/GestureRecorderNative.js.map +0 -1
- package/dist/native/GestureRecorderNativeTurboSpec.d.ts +0 -31
- package/dist/native/GestureRecorderNativeTurboSpec.js +0 -1
- package/dist/native/GestureRecorderNativeTurboSpec.js.map +0 -1
- package/dist/native/SessionRecorderNative.d.ts +0 -33
- package/dist/native/SessionRecorderNative.js +0 -1
- package/dist/native/SessionRecorderNative.js.map +0 -1
- package/dist/native/SessionRecorderNativeTurboSpec.js +0 -1
- package/dist/native/SessionRecorderNativeTurboSpec.js.map +0 -1
- package/dist/native/index.d.ts +0 -2
- package/dist/native/index.js +0 -1
- package/dist/native/index.js.map +0 -1
- package/dist/otel/helpers.js +0 -1
- package/dist/otel/helpers.js.map +0 -1
- package/dist/otel/index.js +0 -1
- package/dist/otel/index.js.map +0 -1
- package/dist/otel/instrumentations/index.js +0 -1
- package/dist/otel/instrumentations/index.js.map +0 -1
- package/dist/patch/index.js +0 -1
- package/dist/patch/index.js.map +0 -1
- package/dist/patch/xhr.js +0 -1
- package/dist/patch/xhr.js.map +0 -1
- package/dist/recorder/eventExporter.js +0 -1
- package/dist/recorder/eventExporter.js.map +0 -1
- package/dist/recorder/gestureRecorder.js +0 -1
- package/dist/recorder/gestureRecorder.js.map +0 -1
- package/dist/recorder/index.js +0 -1
- package/dist/recorder/index.js.map +0 -1
- package/dist/recorder/navigationTracker.js +0 -1
- package/dist/recorder/navigationTracker.js.map +0 -1
- package/dist/recorder/screenRecorder.js +0 -1
- package/dist/recorder/screenRecorder.js.map +0 -1
- package/dist/services/api.service.js +0 -1
- package/dist/services/api.service.js.map +0 -1
- package/dist/services/network.service.js +0 -1
- package/dist/services/network.service.js.map +0 -1
- package/dist/services/screenMaskingService.js +0 -1
- package/dist/services/screenMaskingService.js.map +0 -1
- package/dist/services/storage.service.js +0 -1
- package/dist/services/storage.service.js.map +0 -1
- package/dist/session-recorder.js +0 -1
- package/dist/session-recorder.js.map +0 -1
- package/dist/types/configs.js +0 -1
- package/dist/types/configs.js.map +0 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/session-recorder.js +0 -1
- package/dist/types/session-recorder.js.map +0 -1
- package/dist/types/session.js +0 -1
- package/dist/types/session.js.map +0 -1
- package/dist/utils/app-metadata.js +0 -1
- package/dist/utils/app-metadata.js.map +0 -1
- package/dist/utils/constants.optional.expo.js +0 -1
- package/dist/utils/constants.optional.expo.js.map +0 -1
- package/dist/utils/constants.optional.js +0 -1
- package/dist/utils/constants.optional.js.map +0 -1
- package/dist/utils/createStore.js +0 -1
- package/dist/utils/createStore.js.map +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/logger.js +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/platform.js +0 -1
- package/dist/utils/platform.js.map +0 -1
- package/dist/utils/request-utils.js +0 -1
- package/dist/utils/request-utils.js.map +0 -1
- package/dist/utils/rrweb-events.js +0 -1
- package/dist/utils/rrweb-events.js.map +0 -1
- package/dist/utils/session.js +0 -1
- package/dist/utils/session.js.map +0 -1
- package/dist/utils/shallowEqual.js +0 -1
- package/dist/utils/shallowEqual.js.map +0 -1
- package/dist/utils/time.js +0 -1
- package/dist/utils/time.js.map +0 -1
- package/dist/utils/type-utils.js +0 -1
- package/dist/utils/type-utils.js.map +0 -1
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -1
- package/dist/version.js.map +0 -1
- package/docs/AUTO_METADATA_DETECTION.md +0 -108
- package/ios/GestureRecorderNative.swift +0 -316
- package/ios/SessionRecorderNative.m +0 -17
- package/ios/SessionRecorderNative.podspec +0 -26
- package/turbo.json +0 -41
- /package/{dist/components/index.d.ts → src/components/index.ts} +0 -0
- /package/{dist/patch/index.d.ts → src/patch/index.ts} +0 -0
package/README.md
CHANGED
|
@@ -55,6 +55,65 @@ npx expo install @react-native-async-storage/async-storage @react-native-communi
|
|
|
55
55
|
|
|
56
56
|
If you use Expo Router or a managed workflow, no extra autolinking steps are required beyond installing the packages.
|
|
57
57
|
|
|
58
|
+
### Expo Autolinking Support
|
|
59
|
+
|
|
60
|
+
This package includes full Expo autolinking support with the following configuration files:
|
|
61
|
+
|
|
62
|
+
- ✅ `expo-module.config.json` - Defines supported platforms and module names
|
|
63
|
+
- ✅ `react-native.config.js` - Configures React Native CLI autolinking
|
|
64
|
+
- ✅ Proper TurboModule registration for both iOS and Android
|
|
65
|
+
|
|
66
|
+
The module will be automatically detected and linked when you install it in your Expo project.
|
|
67
|
+
|
|
68
|
+
#### Expo Go vs Development Builds
|
|
69
|
+
|
|
70
|
+
**Important**: This package uses native modules that require custom native code. While autolinking is configured, you may encounter issues with **Expo Go** due to its limitations with custom native modules.
|
|
71
|
+
|
|
72
|
+
**If autolinking doesn't work with Expo Go**, try using development builds instead:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# For iOS
|
|
76
|
+
npx expo run:ios
|
|
77
|
+
|
|
78
|
+
# For Android
|
|
79
|
+
npx expo run:android
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Development builds include your custom native modules and provide the full native functionality needed for session recording.
|
|
83
|
+
|
|
84
|
+
#### Troubleshooting Expo Autolinking
|
|
85
|
+
|
|
86
|
+
If you encounter issues with module autolinking in Expo:
|
|
87
|
+
|
|
88
|
+
1. **Check Expo SDK compatibility**: Ensure you're using a compatible Expo SDK version
|
|
89
|
+
2. **Clear cache**: Run `npx expo start -c` to clear the Expo cache
|
|
90
|
+
3. **Use development builds**: Switch from Expo Go to development builds as shown above
|
|
91
|
+
4. **Verify configuration**: Ensure the autolinking configuration files are present in your `node_modules/@multiplayer-app/session-recorder-react-native/` directory
|
|
92
|
+
|
|
93
|
+
#### Expo Configuration
|
|
94
|
+
|
|
95
|
+
For Expo applications, the package automatically detects the Expo environment:
|
|
96
|
+
|
|
97
|
+
```javascript
|
|
98
|
+
import SessionRecorder from '@multiplayer-app/session-recorder-react-native';
|
|
99
|
+
|
|
100
|
+
SessionRecorder.init({
|
|
101
|
+
application: 'my-expo-app',
|
|
102
|
+
version: '1.0.0',
|
|
103
|
+
environment: 'production',
|
|
104
|
+
apiKey: 'YOUR_MULTIPLAYER_API_KEY',
|
|
105
|
+
recordGestures: true,
|
|
106
|
+
recordNavigation: true,
|
|
107
|
+
recordScreen: true,
|
|
108
|
+
});
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The package will automatically:
|
|
112
|
+
|
|
113
|
+
- Detect Expo environment using `expo-constants`
|
|
114
|
+
- Add Expo-specific attributes to traces
|
|
115
|
+
- Optimize performance for Expo runtime
|
|
116
|
+
|
|
58
117
|
#### Why direct install is required
|
|
59
118
|
|
|
60
119
|
- Autolinking scans only the app's `package.json`
|
|
@@ -92,43 +151,51 @@ If you encounter:
|
|
|
92
151
|
#### For Basic React Native Apps (App.tsx)
|
|
93
152
|
|
|
94
153
|
```javascript
|
|
95
|
-
import React from 'react'
|
|
96
|
-
import {
|
|
154
|
+
import React from 'react';
|
|
155
|
+
import {
|
|
156
|
+
SessionRecorderProvider,
|
|
157
|
+
SessionRecorder,
|
|
158
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
97
159
|
|
|
98
160
|
// Initialize with minimal required options
|
|
99
161
|
SessionRecorder.init({
|
|
100
162
|
application: 'my-react-native-app',
|
|
101
163
|
version: '1.0.0',
|
|
102
164
|
environment: 'production',
|
|
103
|
-
apiKey: 'YOUR_MULTIPLAYER_API_KEY'
|
|
104
|
-
})
|
|
165
|
+
apiKey: 'YOUR_MULTIPLAYER_API_KEY',
|
|
166
|
+
});
|
|
105
167
|
|
|
106
168
|
export default function App() {
|
|
107
|
-
return
|
|
169
|
+
return (
|
|
170
|
+
<SessionRecorderProvider>{/* Your app content */}</SessionRecorderProvider>
|
|
171
|
+
);
|
|
108
172
|
}
|
|
109
173
|
```
|
|
110
174
|
|
|
111
175
|
#### For Expo Apps (\_layout.tsx)
|
|
112
176
|
|
|
113
177
|
```javascript
|
|
114
|
-
import React from 'react'
|
|
115
|
-
import { Stack } from 'expo-router'
|
|
116
|
-
import {
|
|
178
|
+
import React from 'react';
|
|
179
|
+
import { Stack } from 'expo-router';
|
|
180
|
+
import {
|
|
181
|
+
SessionRecorderProvider,
|
|
182
|
+
SessionRecorder,
|
|
183
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
117
184
|
|
|
118
185
|
// Initialize with minimal required options
|
|
119
186
|
SessionRecorder.init({
|
|
120
187
|
application: 'my-expo-app',
|
|
121
188
|
version: '1.0.0',
|
|
122
189
|
environment: 'production',
|
|
123
|
-
apiKey: 'YOUR_MULTIPLAYER_API_KEY'
|
|
124
|
-
})
|
|
190
|
+
apiKey: 'YOUR_MULTIPLAYER_API_KEY',
|
|
191
|
+
});
|
|
125
192
|
|
|
126
193
|
export default function RootLayout() {
|
|
127
194
|
return (
|
|
128
195
|
<SessionRecorderProvider>
|
|
129
196
|
<Stack />
|
|
130
197
|
</SessionRecorderProvider>
|
|
131
|
-
)
|
|
198
|
+
);
|
|
132
199
|
}
|
|
133
200
|
```
|
|
134
201
|
|
|
@@ -144,8 +211,11 @@ This minimal setup will:
|
|
|
144
211
|
#### For Basic React Native Apps (App.tsx)
|
|
145
212
|
|
|
146
213
|
```javascript
|
|
147
|
-
import React from 'react'
|
|
148
|
-
import {
|
|
214
|
+
import React from 'react';
|
|
215
|
+
import {
|
|
216
|
+
SessionRecorderProvider,
|
|
217
|
+
SessionRecorder,
|
|
218
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
149
219
|
|
|
150
220
|
SessionRecorder.init({
|
|
151
221
|
application: 'my-react-native-app',
|
|
@@ -154,20 +224,25 @@ SessionRecorder.init({
|
|
|
154
224
|
apiKey: 'YOUR_MULTIPLAYER_API_KEY',
|
|
155
225
|
recordGestures: true, // default is true
|
|
156
226
|
recordNavigation: true, // default is true
|
|
157
|
-
recordScreen: true // default is true
|
|
158
|
-
})
|
|
227
|
+
recordScreen: true, // default is true
|
|
228
|
+
});
|
|
159
229
|
|
|
160
230
|
export default function App() {
|
|
161
|
-
return
|
|
231
|
+
return (
|
|
232
|
+
<SessionRecorderProvider>{/* Your app content */}</SessionRecorderProvider>
|
|
233
|
+
);
|
|
162
234
|
}
|
|
163
235
|
```
|
|
164
236
|
|
|
165
237
|
#### For Expo Apps (\_layout.tsx)
|
|
166
238
|
|
|
167
239
|
```javascript
|
|
168
|
-
import React from 'react'
|
|
169
|
-
import { Stack } from 'expo-router'
|
|
170
|
-
import {
|
|
240
|
+
import React from 'react';
|
|
241
|
+
import { Stack } from 'expo-router';
|
|
242
|
+
import {
|
|
243
|
+
SessionRecorderProvider,
|
|
244
|
+
SessionRecorder,
|
|
245
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
171
246
|
|
|
172
247
|
SessionRecorder.init({
|
|
173
248
|
application: 'my-expo-app',
|
|
@@ -176,15 +251,15 @@ SessionRecorder.init({
|
|
|
176
251
|
apiKey: 'YOUR_MULTIPLAYER_API_KEY',
|
|
177
252
|
recordGestures: true, // default is true
|
|
178
253
|
recordNavigation: true, // default is true
|
|
179
|
-
recordScreen: true // default is true
|
|
180
|
-
})
|
|
254
|
+
recordScreen: true, // default is true
|
|
255
|
+
});
|
|
181
256
|
|
|
182
257
|
export default function RootLayout() {
|
|
183
258
|
return (
|
|
184
259
|
<SessionRecorderProvider>
|
|
185
260
|
<Stack />
|
|
186
261
|
</SessionRecorderProvider>
|
|
187
|
-
)
|
|
262
|
+
);
|
|
188
263
|
}
|
|
189
264
|
```
|
|
190
265
|
|
|
@@ -193,11 +268,14 @@ export default function RootLayout() {
|
|
|
193
268
|
Here's a complete example showing how to integrate the session recorder in your React Native app:
|
|
194
269
|
|
|
195
270
|
```javascript
|
|
196
|
-
import React, { useEffect, useRef } from 'react'
|
|
197
|
-
import { NavigationContainer } from '@react-navigation/native'
|
|
198
|
-
import { SafeAreaProvider } from 'react-native-safe-area-context'
|
|
199
|
-
import {
|
|
200
|
-
|
|
271
|
+
import React, { useEffect, useRef } from 'react';
|
|
272
|
+
import { NavigationContainer } from '@react-navigation/native';
|
|
273
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
274
|
+
import {
|
|
275
|
+
SessionRecorderProvider,
|
|
276
|
+
SessionRecorder,
|
|
277
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
278
|
+
import { AppNavigator } from './navigation/AppNavigator';
|
|
201
279
|
|
|
202
280
|
// Initialize session recorder
|
|
203
281
|
SessionRecorder.init({
|
|
@@ -207,20 +285,20 @@ SessionRecorder.init({
|
|
|
207
285
|
apiKey: 'YOUR_MULTIPLAYER_API_KEY',
|
|
208
286
|
recordGestures: true,
|
|
209
287
|
recordNavigation: true,
|
|
210
|
-
recordScreen: false // Enable after adding permissions
|
|
211
|
-
})
|
|
288
|
+
recordScreen: false, // Enable after adding permissions
|
|
289
|
+
});
|
|
212
290
|
|
|
213
291
|
export default function App() {
|
|
214
|
-
const navigationRef = useRef(null)
|
|
292
|
+
const navigationRef = useRef(null);
|
|
215
293
|
|
|
216
294
|
useEffect(() => {
|
|
217
295
|
// Set session attributes for better debugging context
|
|
218
296
|
SessionRecorder.setSessionAttributes({
|
|
219
297
|
userId: 'user123',
|
|
220
298
|
userType: 'premium',
|
|
221
|
-
appVersion: '1.0.0'
|
|
222
|
-
})
|
|
223
|
-
}, [])
|
|
299
|
+
appVersion: '1.0.0',
|
|
300
|
+
});
|
|
301
|
+
}, []);
|
|
224
302
|
|
|
225
303
|
return (
|
|
226
304
|
<SessionRecorderProvider>
|
|
@@ -228,14 +306,14 @@ export default function App() {
|
|
|
228
306
|
<NavigationContainer
|
|
229
307
|
ref={navigationRef}
|
|
230
308
|
onReady={() => {
|
|
231
|
-
SessionRecorder.setNavigationRef(navigationRef.current)
|
|
309
|
+
SessionRecorder.setNavigationRef(navigationRef.current);
|
|
232
310
|
}}
|
|
233
311
|
>
|
|
234
312
|
<AppNavigator />
|
|
235
313
|
</NavigationContainer>
|
|
236
314
|
</SafeAreaProvider>
|
|
237
315
|
</SessionRecorderProvider>
|
|
238
|
-
)
|
|
316
|
+
);
|
|
239
317
|
}
|
|
240
318
|
```
|
|
241
319
|
|
|
@@ -244,7 +322,7 @@ export default function App() {
|
|
|
244
322
|
For Expo applications, the package automatically detects the Expo environment:
|
|
245
323
|
|
|
246
324
|
```javascript
|
|
247
|
-
import SessionRecorder from '@multiplayer-app/session-recorder-react-native'
|
|
325
|
+
import SessionRecorder from '@multiplayer-app/session-recorder-react-native';
|
|
248
326
|
|
|
249
327
|
SessionRecorder.init({
|
|
250
328
|
application: 'my-expo-app',
|
|
@@ -253,8 +331,8 @@ SessionRecorder.init({
|
|
|
253
331
|
apiKey: 'YOUR_MULTIPLAYER_API_KEY',
|
|
254
332
|
recordGestures: true,
|
|
255
333
|
recordNavigation: true,
|
|
256
|
-
recordScreen: true
|
|
257
|
-
})
|
|
334
|
+
recordScreen: true,
|
|
335
|
+
});
|
|
258
336
|
```
|
|
259
337
|
|
|
260
338
|
The package will automatically:
|
|
@@ -270,26 +348,29 @@ The package will automatically:
|
|
|
270
348
|
Expo Router already manages the NavigationContainer. Don't add your own.
|
|
271
349
|
|
|
272
350
|
```tsx
|
|
273
|
-
import { useEffect } from 'react'
|
|
274
|
-
import { Stack, useNavigationContainerRef } from 'expo-router'
|
|
275
|
-
import {
|
|
351
|
+
import { useEffect } from 'react';
|
|
352
|
+
import { Stack, useNavigationContainerRef } from 'expo-router';
|
|
353
|
+
import {
|
|
354
|
+
SessionRecorderProvider,
|
|
355
|
+
SessionRecorder,
|
|
356
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
276
357
|
|
|
277
358
|
export default function RootLayout() {
|
|
278
|
-
const navigationRef = useNavigationContainerRef()
|
|
359
|
+
const navigationRef = useNavigationContainerRef();
|
|
279
360
|
|
|
280
361
|
useEffect(() => {
|
|
281
362
|
const unsub = navigationRef.addListener?.('state', () => {
|
|
282
|
-
SessionRecorder.setNavigationRef(navigationRef)
|
|
283
|
-
unsub?.()
|
|
284
|
-
})
|
|
285
|
-
return unsub
|
|
286
|
-
}, [navigationRef])
|
|
363
|
+
SessionRecorder.setNavigationRef(navigationRef);
|
|
364
|
+
unsub?.();
|
|
365
|
+
});
|
|
366
|
+
return unsub;
|
|
367
|
+
}, [navigationRef]);
|
|
287
368
|
|
|
288
369
|
return (
|
|
289
370
|
<SessionRecorderProvider>
|
|
290
371
|
<Stack />
|
|
291
372
|
</SessionRecorderProvider>
|
|
292
|
-
)
|
|
373
|
+
);
|
|
293
374
|
}
|
|
294
375
|
```
|
|
295
376
|
|
|
@@ -298,25 +379,28 @@ export default function RootLayout() {
|
|
|
298
379
|
If you own the `NavigationContainer`, set the ref in `onReady`:
|
|
299
380
|
|
|
300
381
|
```tsx
|
|
301
|
-
import { NavigationContainer } from '@react-navigation/native'
|
|
302
|
-
import { useRef } from 'react'
|
|
303
|
-
import {
|
|
382
|
+
import { NavigationContainer } from '@react-navigation/native';
|
|
383
|
+
import { useRef } from 'react';
|
|
384
|
+
import {
|
|
385
|
+
SessionRecorderProvider,
|
|
386
|
+
SessionRecorder,
|
|
387
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
304
388
|
|
|
305
389
|
export default function App() {
|
|
306
|
-
const navigationRef = useRef<any>(null)
|
|
390
|
+
const navigationRef = useRef<any>(null);
|
|
307
391
|
|
|
308
392
|
return (
|
|
309
393
|
<SessionRecorderProvider>
|
|
310
394
|
<NavigationContainer
|
|
311
395
|
ref={navigationRef}
|
|
312
396
|
onReady={() => {
|
|
313
|
-
SessionRecorder.setNavigationRef(navigationRef.current)
|
|
397
|
+
SessionRecorder.setNavigationRef(navigationRef.current);
|
|
314
398
|
}}
|
|
315
399
|
>
|
|
316
400
|
{/* Your navigation stack */}
|
|
317
401
|
</NavigationContainer>
|
|
318
402
|
</SessionRecorderProvider>
|
|
319
|
-
)
|
|
403
|
+
);
|
|
320
404
|
}
|
|
321
405
|
```
|
|
322
406
|
|
|
@@ -324,26 +408,26 @@ export default function App() {
|
|
|
324
408
|
|
|
325
409
|
```javascript
|
|
326
410
|
// Start a new recording session
|
|
327
|
-
SessionRecorder.start()
|
|
411
|
+
SessionRecorder.start();
|
|
328
412
|
|
|
329
413
|
// Pause current recording
|
|
330
|
-
SessionRecorder.pause()
|
|
414
|
+
SessionRecorder.pause();
|
|
331
415
|
|
|
332
416
|
// Resume paused recording
|
|
333
|
-
SessionRecorder.resume()
|
|
417
|
+
SessionRecorder.resume();
|
|
334
418
|
|
|
335
419
|
// Stop recording with optional reason
|
|
336
|
-
SessionRecorder.stop('Session completed')
|
|
420
|
+
SessionRecorder.stop('Session completed');
|
|
337
421
|
|
|
338
422
|
// Save continuous recording (for continuous mode)
|
|
339
|
-
SessionRecorder.save()
|
|
423
|
+
SessionRecorder.save();
|
|
340
424
|
|
|
341
425
|
// Set session attributes for better context
|
|
342
426
|
SessionRecorder.setSessionAttributes({
|
|
343
427
|
userId: 'user123',
|
|
344
428
|
feature: 'checkout',
|
|
345
|
-
version: '2.1.0'
|
|
346
|
-
})
|
|
429
|
+
version: '2.1.0',
|
|
430
|
+
});
|
|
347
431
|
```
|
|
348
432
|
|
|
349
433
|
## Session Provider & Hooks
|
|
@@ -363,10 +447,10 @@ SessionRecorder.init({
|
|
|
363
447
|
widget: {
|
|
364
448
|
enabled: true,
|
|
365
449
|
button: {
|
|
366
|
-
visible: false // Hide the floating button
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
})
|
|
450
|
+
visible: false, // Hide the floating button
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
});
|
|
370
454
|
```
|
|
371
455
|
|
|
372
456
|
### Programmatic Widget Control
|
|
@@ -374,56 +458,67 @@ SessionRecorder.init({
|
|
|
374
458
|
Use the `useSessionRecorder` hook to control the widget modal programmatically:
|
|
375
459
|
|
|
376
460
|
```javascript
|
|
377
|
-
import React from 'react'
|
|
378
|
-
import { View, Button } from 'react-native'
|
|
379
|
-
import { useSessionRecorder } from '@multiplayer-app/session-recorder-react-native'
|
|
461
|
+
import React from 'react';
|
|
462
|
+
import { View, Button } from 'react-native';
|
|
463
|
+
import { useSessionRecorder } from '@multiplayer-app/session-recorder-react-native';
|
|
380
464
|
|
|
381
465
|
function MyComponent() {
|
|
382
|
-
const { openWidgetModal, closeWidgetModal } = useSessionRecorder()
|
|
466
|
+
const { openWidgetModal, closeWidgetModal } = useSessionRecorder();
|
|
383
467
|
|
|
384
468
|
return (
|
|
385
469
|
<View>
|
|
386
|
-
<Button title=
|
|
387
|
-
<Button title=
|
|
470
|
+
<Button title="Open Session Recorder" onPress={openWidgetModal} />
|
|
471
|
+
<Button title="Close Session Recorder" onPress={closeWidgetModal} />
|
|
388
472
|
</View>
|
|
389
|
-
)
|
|
473
|
+
);
|
|
390
474
|
}
|
|
391
475
|
```
|
|
392
476
|
|
|
393
477
|
### Session Control with Hooks
|
|
394
478
|
|
|
395
479
|
```javascript
|
|
396
|
-
import React from 'react'
|
|
397
|
-
import { View, Button } from 'react-native'
|
|
398
|
-
import { useSessionRecorder } from '@multiplayer-app/session-recorder-react-native'
|
|
480
|
+
import React from 'react';
|
|
481
|
+
import { View, Button } from 'react-native';
|
|
482
|
+
import { useSessionRecorder } from '@multiplayer-app/session-recorder-react-native';
|
|
399
483
|
|
|
400
484
|
function SessionControls() {
|
|
401
|
-
const {
|
|
485
|
+
const {
|
|
486
|
+
startSession,
|
|
487
|
+
stopSession,
|
|
488
|
+
pauseSession,
|
|
489
|
+
resumeSession,
|
|
490
|
+
saveSession,
|
|
491
|
+
} = useSessionRecorder();
|
|
402
492
|
|
|
403
493
|
return (
|
|
404
494
|
<View>
|
|
405
|
-
<Button title=
|
|
406
|
-
<Button title=
|
|
407
|
-
<Button title=
|
|
408
|
-
<Button
|
|
409
|
-
|
|
495
|
+
<Button title="Start Session" onPress={() => startSession()} />
|
|
496
|
+
<Button title="Pause Session" onPress={() => pauseSession()} />
|
|
497
|
+
<Button title="Resume Session" onPress={() => resumeSession()} />
|
|
498
|
+
<Button
|
|
499
|
+
title="Stop Session"
|
|
500
|
+
onPress={() => stopSession('User completed')}
|
|
501
|
+
/>
|
|
502
|
+
<Button title="Save Session" onPress={() => saveSession()} />
|
|
410
503
|
</View>
|
|
411
|
-
)
|
|
504
|
+
);
|
|
412
505
|
}
|
|
413
506
|
```
|
|
414
507
|
|
|
415
508
|
### Session State with Hooks
|
|
416
509
|
|
|
417
510
|
```javascript
|
|
418
|
-
import React from 'react'
|
|
419
|
-
import { View, Text } from 'react-native'
|
|
420
|
-
import { useSessionRecorderStore } from '@multiplayer-app/session-recorder-react-native'
|
|
511
|
+
import React from 'react';
|
|
512
|
+
import { View, Text } from 'react-native';
|
|
513
|
+
import { useSessionRecorderStore } from '@multiplayer-app/session-recorder-react-native';
|
|
421
514
|
|
|
422
515
|
function SessionStatus() {
|
|
423
|
-
const sessionType = useSessionRecorderStore((s) => s.sessionType)
|
|
424
|
-
const isWidgetModalVisible = useSessionRecorderStore(
|
|
425
|
-
|
|
426
|
-
|
|
516
|
+
const sessionType = useSessionRecorderStore((s) => s.sessionType);
|
|
517
|
+
const isWidgetModalVisible = useSessionRecorderStore(
|
|
518
|
+
(s) => s.isWidgetModalVisible
|
|
519
|
+
);
|
|
520
|
+
const sessionState = useSessionRecorderStore((s) => s.sessionState);
|
|
521
|
+
const isOnline = useSessionRecorderStore((s) => s.isOnline);
|
|
427
522
|
|
|
428
523
|
return (
|
|
429
524
|
<View>
|
|
@@ -432,56 +527,58 @@ function SessionStatus() {
|
|
|
432
527
|
<Text>Widget Visible: {isWidgetModalVisible ? 'Yes' : 'No'}</Text>
|
|
433
528
|
<Text>Online: {isOnline ? 'Yes' : 'No'}</Text>
|
|
434
529
|
</View>
|
|
435
|
-
)
|
|
530
|
+
);
|
|
436
531
|
}
|
|
437
532
|
```
|
|
438
533
|
|
|
439
534
|
### Complete Example with Custom UI
|
|
440
535
|
|
|
441
536
|
```javascript
|
|
442
|
-
import React, { useEffect } from 'react'
|
|
443
|
-
import { View, Button, Text, Alert } from 'react-native'
|
|
537
|
+
import React, { useEffect } from 'react';
|
|
538
|
+
import { View, Button, Text, Alert } from 'react-native';
|
|
444
539
|
import {
|
|
445
540
|
SessionRecorderProvider,
|
|
446
541
|
useSessionRecorder,
|
|
447
|
-
useSessionRecorderStore
|
|
448
|
-
} from '@multiplayer-app/session-recorder-react-native'
|
|
542
|
+
useSessionRecorderStore,
|
|
543
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
449
544
|
|
|
450
545
|
function SessionRecorderUI() {
|
|
451
|
-
const { startSession, stopSession, openWidgetModal } = useSessionRecorder()
|
|
452
|
-
const { sessionState, isWidgetModalVisible } = useSessionRecorderStore(
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
546
|
+
const { startSession, stopSession, openWidgetModal } = useSessionRecorder();
|
|
547
|
+
const { sessionState, isWidgetModalVisible } = useSessionRecorderStore(
|
|
548
|
+
(state) => ({
|
|
549
|
+
sessionState: state.sessionState,
|
|
550
|
+
isWidgetModalVisible: state.isWidgetModalVisible,
|
|
551
|
+
})
|
|
552
|
+
);
|
|
456
553
|
|
|
457
554
|
const handleStartRecording = async () => {
|
|
458
555
|
try {
|
|
459
|
-
await startSession()
|
|
460
|
-
Alert.alert('Success', 'Session recording started')
|
|
556
|
+
await startSession();
|
|
557
|
+
Alert.alert('Success', 'Session recording started');
|
|
461
558
|
} catch (error) {
|
|
462
|
-
Alert.alert('Error', 'Failed to start recording')
|
|
559
|
+
Alert.alert('Error', 'Failed to start recording');
|
|
463
560
|
}
|
|
464
|
-
}
|
|
561
|
+
};
|
|
465
562
|
|
|
466
563
|
const handleStopRecording = async () => {
|
|
467
564
|
try {
|
|
468
|
-
await stopSession('User manually stopped')
|
|
469
|
-
Alert.alert('Success', 'Session recording stopped')
|
|
565
|
+
await stopSession('User manually stopped');
|
|
566
|
+
Alert.alert('Success', 'Session recording stopped');
|
|
470
567
|
} catch (error) {
|
|
471
|
-
Alert.alert('Error', 'Failed to stop recording')
|
|
568
|
+
Alert.alert('Error', 'Failed to stop recording');
|
|
472
569
|
}
|
|
473
|
-
}
|
|
570
|
+
};
|
|
474
571
|
|
|
475
572
|
return (
|
|
476
573
|
<View style={{ padding: 20 }}>
|
|
477
574
|
<Text>Session State: {sessionState}</Text>
|
|
478
575
|
<Text>Widget Modal: {isWidgetModalVisible ? 'Open' : 'Closed'}</Text>
|
|
479
576
|
|
|
480
|
-
<Button title=
|
|
481
|
-
<Button title=
|
|
482
|
-
<Button title=
|
|
577
|
+
<Button title="Start Recording" onPress={handleStartRecording} />
|
|
578
|
+
<Button title="Stop Recording" onPress={handleStopRecording} />
|
|
579
|
+
<Button title="Open Widget" onPress={openWidgetModal} />
|
|
483
580
|
</View>
|
|
484
|
-
)
|
|
581
|
+
);
|
|
485
582
|
}
|
|
486
583
|
|
|
487
584
|
export default function App() {
|
|
@@ -489,7 +586,7 @@ export default function App() {
|
|
|
489
586
|
<SessionRecorderProvider>
|
|
490
587
|
<SessionRecorderUI />
|
|
491
588
|
</SessionRecorderProvider>
|
|
492
|
-
)
|
|
589
|
+
);
|
|
493
590
|
}
|
|
494
591
|
```
|
|
495
592
|
|
|
@@ -537,7 +634,11 @@ To get the most useful target information in your traces, follow these practices
|
|
|
537
634
|
#### 1. Use Accessibility Labels
|
|
538
635
|
|
|
539
636
|
```jsx
|
|
540
|
-
<TouchableOpacity
|
|
637
|
+
<TouchableOpacity
|
|
638
|
+
accessibilityLabel="Submit user registration form"
|
|
639
|
+
accessibilityRole="button"
|
|
640
|
+
onPress={handleSubmit}
|
|
641
|
+
>
|
|
541
642
|
<Text>Submit</Text>
|
|
542
643
|
</TouchableOpacity>
|
|
543
644
|
```
|
|
@@ -545,7 +646,11 @@ To get the most useful target information in your traces, follow these practices
|
|
|
545
646
|
#### 2. Add Test IDs for Testing Context
|
|
546
647
|
|
|
547
648
|
```jsx
|
|
548
|
-
<TouchableOpacity
|
|
649
|
+
<TouchableOpacity
|
|
650
|
+
testID="registration-submit-btn"
|
|
651
|
+
accessibilityLabel="Submit registration"
|
|
652
|
+
onPress={handleSubmit}
|
|
653
|
+
>
|
|
549
654
|
<Text>Submit</Text>
|
|
550
655
|
</TouchableOpacity>
|
|
551
656
|
```
|
|
@@ -663,9 +768,12 @@ SessionRecorder.init({
|
|
|
663
768
|
// NOTE: if frontend domain doesn't match to backend one, set backend domain to `propagateTraceHeaderCorsUrls` parameter
|
|
664
769
|
propagateTraceHeaderCorsUrls: [
|
|
665
770
|
new RegExp('https://your.backend.api.domain', 'i'), // can be regex or string
|
|
666
|
-
new RegExp('https://another.backend.api.domain', 'i')
|
|
771
|
+
new RegExp('https://another.backend.api.domain', 'i'),
|
|
772
|
+
],
|
|
773
|
+
ignoreUrls: [
|
|
774
|
+
/https:\/\/analytics\.example\.com/,
|
|
775
|
+
/https:\/\/crashlytics\.com/,
|
|
667
776
|
],
|
|
668
|
-
ignoreUrls: [/https:\/\/analytics\.example\.com/, /https:\/\/crashlytics\.com/],
|
|
669
777
|
captureBody: true,
|
|
670
778
|
captureHeaders: true,
|
|
671
779
|
maxCapturingHttpPayloadSize: 100000,
|
|
@@ -677,7 +785,7 @@ SessionRecorder.init({
|
|
|
677
785
|
maskBodyFieldsList: ['password', 'token', 'secret', 'creditCard'],
|
|
678
786
|
maskTextInputs: true,
|
|
679
787
|
maskImages: false,
|
|
680
|
-
maskButtons: false
|
|
788
|
+
maskButtons: false,
|
|
681
789
|
},
|
|
682
790
|
|
|
683
791
|
// Session widget configuration
|
|
@@ -685,19 +793,22 @@ SessionRecorder.init({
|
|
|
685
793
|
enabled: true,
|
|
686
794
|
button: {
|
|
687
795
|
visible: true,
|
|
688
|
-
placement: 'bottomRight' // or 'bottomLeft'
|
|
689
|
-
}
|
|
796
|
+
placement: 'bottomRight', // or 'bottomLeft'
|
|
797
|
+
},
|
|
690
798
|
},
|
|
691
799
|
|
|
692
800
|
// Continuous recording
|
|
693
|
-
showContinuousRecording: true
|
|
694
|
-
})
|
|
801
|
+
showContinuousRecording: true,
|
|
802
|
+
});
|
|
695
803
|
```
|
|
696
804
|
|
|
697
805
|
### Environment-Specific Configuration
|
|
698
806
|
|
|
699
807
|
```javascript
|
|
700
|
-
import {
|
|
808
|
+
import {
|
|
809
|
+
SessionRecorder,
|
|
810
|
+
LogLevel,
|
|
811
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
701
812
|
|
|
702
813
|
const config = {
|
|
703
814
|
application: 'my-app',
|
|
@@ -708,12 +819,12 @@ const config = {
|
|
|
708
819
|
...(__DEV__ && {
|
|
709
820
|
logger: {
|
|
710
821
|
enabled: true,
|
|
711
|
-
level: LogLevel.DEBUG
|
|
712
|
-
}
|
|
713
|
-
})
|
|
714
|
-
}
|
|
822
|
+
level: LogLevel.DEBUG,
|
|
823
|
+
},
|
|
824
|
+
}),
|
|
825
|
+
};
|
|
715
826
|
|
|
716
|
-
SessionRecorder.init(config)
|
|
827
|
+
SessionRecorder.init(config);
|
|
717
828
|
```
|
|
718
829
|
|
|
719
830
|
## Troubleshooting
|
|
@@ -757,7 +868,27 @@ SessionRecorder.init(config)
|
|
|
757
868
|
- Ensure `expo-constants` is installed: `npx expo install expo-constants`
|
|
758
869
|
- Check that you're using the correct Expo SDK version
|
|
759
870
|
|
|
760
|
-
#### 6.
|
|
871
|
+
#### 6. TurboModule Not Found (Expo Go)
|
|
872
|
+
|
|
873
|
+
If you see this error in Expo Go:
|
|
874
|
+
|
|
875
|
+
```
|
|
876
|
+
TurboModuleRegistry.getEnforcing(...): 'SessionRecorderNative' could not be found
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
**Solution**: Switch to development builds instead of Expo Go:
|
|
880
|
+
|
|
881
|
+
```bash
|
|
882
|
+
# For iOS
|
|
883
|
+
npx expo run:ios
|
|
884
|
+
|
|
885
|
+
# For Android
|
|
886
|
+
npx expo run:android
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
Expo Go has limitations with custom native modules. Development builds include your custom native code and will resolve this issue.
|
|
890
|
+
|
|
891
|
+
#### 7. Build Issues
|
|
761
892
|
|
|
762
893
|
- **iOS**: Run `cd ios && pod install` after installing dependencies
|
|
763
894
|
- **Android**: Run `cd android && ./gradlew clean`
|
|
@@ -768,15 +899,18 @@ SessionRecorder.init(config)
|
|
|
768
899
|
Enable debug logging to troubleshoot issues:
|
|
769
900
|
|
|
770
901
|
```javascript
|
|
771
|
-
import {
|
|
902
|
+
import {
|
|
903
|
+
SessionRecorder,
|
|
904
|
+
LogLevel,
|
|
905
|
+
} from '@multiplayer-app/session-recorder-react-native';
|
|
772
906
|
|
|
773
907
|
SessionRecorder.init({
|
|
774
908
|
// ... other config
|
|
775
909
|
logger: {
|
|
776
910
|
enabled: true,
|
|
777
|
-
level: LogLevel.DEBUG
|
|
778
|
-
}
|
|
779
|
-
})
|
|
911
|
+
level: LogLevel.DEBUG,
|
|
912
|
+
},
|
|
913
|
+
});
|
|
780
914
|
```
|
|
781
915
|
|
|
782
916
|
## Examples
|
|
@@ -814,38 +948,44 @@ Both examples include:
|
|
|
814
948
|
```typescript
|
|
815
949
|
interface SessionRecorderOptions {
|
|
816
950
|
// Required
|
|
817
|
-
apiKey: string
|
|
818
|
-
application: string
|
|
819
|
-
version: string
|
|
820
|
-
environment: string
|
|
951
|
+
apiKey: string;
|
|
952
|
+
application: string;
|
|
953
|
+
version: string;
|
|
954
|
+
environment: string;
|
|
821
955
|
|
|
822
956
|
// Optional
|
|
823
|
-
exporterEndpoint?: string
|
|
824
|
-
apiBaseUrl?: string
|
|
825
|
-
recordGestures?: boolean
|
|
826
|
-
recordNavigation?: boolean
|
|
827
|
-
recordScreen?: boolean
|
|
828
|
-
sampleTraceRatio?: number
|
|
829
|
-
captureBody?: boolean
|
|
830
|
-
captureHeaders?: boolean
|
|
831
|
-
maxCapturingHttpPayloadSize?: number
|
|
832
|
-
masking?: MaskingOptions
|
|
833
|
-
ignoreUrls?: Array<string | RegExp
|
|
834
|
-
propagateTraceHeaderCorsUrls?: PropagateTraceHeaderCorsUrls
|
|
835
|
-
showContinuousRecording?: boolean
|
|
836
|
-
schemifyDocSpanPayload?: boolean
|
|
837
|
-
widget?: WidgetConfig
|
|
957
|
+
exporterEndpoint?: string;
|
|
958
|
+
apiBaseUrl?: string;
|
|
959
|
+
recordGestures?: boolean;
|
|
960
|
+
recordNavigation?: boolean;
|
|
961
|
+
recordScreen?: boolean;
|
|
962
|
+
sampleTraceRatio?: number;
|
|
963
|
+
captureBody?: boolean;
|
|
964
|
+
captureHeaders?: boolean;
|
|
965
|
+
maxCapturingHttpPayloadSize?: number;
|
|
966
|
+
masking?: MaskingOptions;
|
|
967
|
+
ignoreUrls?: Array<string | RegExp>;
|
|
968
|
+
propagateTraceHeaderCorsUrls?: PropagateTraceHeaderCorsUrls;
|
|
969
|
+
showContinuousRecording?: boolean;
|
|
970
|
+
schemifyDocSpanPayload?: boolean;
|
|
971
|
+
widget?: WidgetConfig;
|
|
838
972
|
logger?: {
|
|
839
|
-
level?: number
|
|
840
|
-
enabled?: boolean
|
|
841
|
-
}
|
|
973
|
+
level?: number;
|
|
974
|
+
enabled?: boolean;
|
|
975
|
+
};
|
|
842
976
|
}
|
|
843
977
|
```
|
|
844
978
|
|
|
845
979
|
## Contributing
|
|
846
980
|
|
|
847
|
-
|
|
981
|
+
- [Development workflow](CONTRIBUTING.md#development-workflow)
|
|
982
|
+
- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
|
|
983
|
+
- [Code of conduct](CODE_OF_CONDUCT.md)
|
|
848
984
|
|
|
849
985
|
## License
|
|
850
986
|
|
|
851
|
-
MIT
|
|
987
|
+
MIT
|
|
988
|
+
|
|
989
|
+
---
|
|
990
|
+
|
|
991
|
+
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|