nervoscan-js-sdk 1.1.2-rc.29092025.dev01 → 1.1.2

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.
Files changed (42) hide show
  1. package/README.md +31 -0
  2. package/dist/nervoscan-js-sdk.cjs +131 -136
  3. package/dist/nervoscan-js-sdk.mjs +9841 -10265
  4. package/dist/nervoscan-js-sdk.umd.js +131 -136
  5. package/package.json +9 -3
  6. package/.env +0 -4
  7. package/.env.production +0 -4
  8. package/.github/workflows/deploy-doc.yaml +0 -12
  9. package/CHANGELOG.md +0 -52
  10. package/TIMING_ANALYSIS_README.md +0 -218
  11. package/nervotec.png +0 -0
  12. package/run_timing_analysis.sh +0 -95
  13. package/src/api/Client.ts +0 -435
  14. package/src/api/types/general_types.ts +0 -21
  15. package/src/api/types.ts +0 -9
  16. package/src/api/utils/analytics/analytics.ts +0 -40
  17. package/src/api/utils/backend_repository/backendRepository.ts +0 -307
  18. package/src/api/utils/debug/logging.ts +0 -98
  19. package/src/api/utils/error_handler.ts +0 -81
  20. package/src/api/utils/error_registry.ts +0 -36
  21. package/src/api/utils/errors.ts +0 -382
  22. package/src/api/utils/general_utils.ts +0 -62
  23. package/src/api/utils/licensing/licenceManager.ts +0 -44
  24. package/src/api/utils/rgb/face_landmarker.ts +0 -1212
  25. package/src/api/utils/rgb/frame_capture.ts +0 -241
  26. package/src/api/utils/rgb/rgb_constants.ts +0 -62
  27. package/src/api/utils/rgb/rgb_manager.ts +0 -887
  28. package/src/api/utils/rgb/rgb_utils.ts +0 -102
  29. package/src/api/utils/streaming/server/server_streaming.ts +0 -220
  30. package/src/index.ts +0 -4
  31. package/test/smoke/setup.mjs +0 -5
  32. package/test/smoke/test_rgb.ts +0 -790
  33. package/test/smoke/test_streaming.ts +0 -423
  34. package/test/smoke/test_video.ts +0 -92
  35. package/test/smoke/timing_analysis.ts +0 -796
  36. package/test/smoke/timing_report_2025-08-18.md +0 -51
  37. package/test/tsconfig.json +0 -12
  38. package/test_quick_timing.sh +0 -32
  39. package/timing_analysis_example.md +0 -142
  40. package/tsconfig.json +0 -114
  41. package/typedoc.json +0 -8
  42. package/vite.config.ts +0 -29
package/README.md CHANGED
@@ -29,6 +29,37 @@ The **NervoScan JS SDK** is a comprehensive JavaScript/TypeScript library that e
29
29
  npm install nervoscan-js-sdk
30
30
  ```
31
31
 
32
+ ### China network compatibility (MediaPipe assets)
33
+
34
+ The SDK internally uses MediaPipe Tasks (Face Landmarker), which requires:
35
+ - `vision_wasm_internal.js` and `vision_wasm_internal.wasm`
36
+ - `face_landmarker.task` model
37
+
38
+ By default, these are fetched from public CDNs. In China networks they may be slow/blocked. The SDK now:
39
+ - Automatically falls back to bundled assets included in the library build
40
+ - Allows optional overrides so you can serve assets from your own static host
41
+
42
+ Optional configuration at streaming init:
43
+
44
+ ```typescript
45
+ await client.initializeStreaming(stream, videoElement, {
46
+ mediapipe: {
47
+ // Optional: point to your own static host (must contain the two WASM files)
48
+ wasmBaseUrl: '/static/mediapipe/wasm/',
49
+ // Optional: host the model yourself
50
+ modelAssetPath: '/static/models/face_landmarker.task',
51
+ // Optional: prefer bundled assets first (then fall back to CDN)
52
+ preferBundledAssets: true,
53
+ // Optional: probe timeout in ms (default 2500)
54
+ timeoutMs: 2500
55
+ }
56
+ });
57
+ ```
58
+
59
+ No configuration is required; the fallback works automatically. If you override paths:
60
+ - Ensure `wasmBaseUrl` contains both `vision_wasm_internal.js` and `vision_wasm_internal.wasm`
61
+ - Serve `.wasm` with `application/wasm` MIME type
62
+
32
63
  Or with yarn:
33
64
  ```bash
34
65
  yarn add nervoscan-js-sdk