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.
- package/README.md +31 -0
- package/dist/nervoscan-js-sdk.cjs +131 -136
- package/dist/nervoscan-js-sdk.mjs +9841 -10265
- package/dist/nervoscan-js-sdk.umd.js +131 -136
- package/package.json +9 -3
- package/.env +0 -4
- package/.env.production +0 -4
- package/.github/workflows/deploy-doc.yaml +0 -12
- package/CHANGELOG.md +0 -52
- package/TIMING_ANALYSIS_README.md +0 -218
- package/nervotec.png +0 -0
- package/run_timing_analysis.sh +0 -95
- package/src/api/Client.ts +0 -435
- package/src/api/types/general_types.ts +0 -21
- package/src/api/types.ts +0 -9
- package/src/api/utils/analytics/analytics.ts +0 -40
- package/src/api/utils/backend_repository/backendRepository.ts +0 -307
- package/src/api/utils/debug/logging.ts +0 -98
- package/src/api/utils/error_handler.ts +0 -81
- package/src/api/utils/error_registry.ts +0 -36
- package/src/api/utils/errors.ts +0 -382
- package/src/api/utils/general_utils.ts +0 -62
- package/src/api/utils/licensing/licenceManager.ts +0 -44
- package/src/api/utils/rgb/face_landmarker.ts +0 -1212
- package/src/api/utils/rgb/frame_capture.ts +0 -241
- package/src/api/utils/rgb/rgb_constants.ts +0 -62
- package/src/api/utils/rgb/rgb_manager.ts +0 -887
- package/src/api/utils/rgb/rgb_utils.ts +0 -102
- package/src/api/utils/streaming/server/server_streaming.ts +0 -220
- package/src/index.ts +0 -4
- package/test/smoke/setup.mjs +0 -5
- package/test/smoke/test_rgb.ts +0 -790
- package/test/smoke/test_streaming.ts +0 -423
- package/test/smoke/test_video.ts +0 -92
- package/test/smoke/timing_analysis.ts +0 -796
- package/test/smoke/timing_report_2025-08-18.md +0 -51
- package/test/tsconfig.json +0 -12
- package/test_quick_timing.sh +0 -32
- package/timing_analysis_example.md +0 -142
- package/tsconfig.json +0 -114
- package/typedoc.json +0 -8
- 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
|