@viji-dev/core 0.3.10 → 0.3.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/dist/assets/{viji.worker-Dq0mIiTV.js → viji.worker-Bus3443t.js} +7 -3
- package/dist/assets/{viji.worker-Dq0mIiTV.js.map → viji.worker-Bus3443t.js.map} +1 -1
- package/dist/{essentia-wasm.web-B3Bvwffq.js → essentia-wasm.web-dGMOt-r-.js} +2 -2
- package/dist/{essentia-wasm.web-B3Bvwffq.js.map → essentia-wasm.web-dGMOt-r-.js.map} +1 -1
- package/dist/{index-aXKP9TJe.js → index-DBTm0Ys2.js} +13 -7
- package/dist/{index-aXKP9TJe.js.map → index-DBTm0Ys2.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -586,7 +586,7 @@ class IFrameManager {
|
|
|
586
586
|
}
|
|
587
587
|
function WorkerWrapper(options) {
|
|
588
588
|
return new Worker(
|
|
589
|
-
"" + new URL("assets/viji.worker-
|
|
589
|
+
"" + new URL("assets/viji.worker-Bus3443t.js", import.meta.url).href,
|
|
590
590
|
{
|
|
591
591
|
type: "module",
|
|
592
592
|
name: options?.name
|
|
@@ -1935,7 +1935,7 @@ class EssentiaOnsetDetection {
|
|
|
1935
1935
|
this.initPromise = (async () => {
|
|
1936
1936
|
try {
|
|
1937
1937
|
const essentiaModule = await import("./essentia.js-core.es-DnrJE0uR.js");
|
|
1938
|
-
const wasmModule = await import("./essentia-wasm.web-
|
|
1938
|
+
const wasmModule = await import("./essentia-wasm.web-dGMOt-r-.js").then((n) => n.e);
|
|
1939
1939
|
const EssentiaClass = essentiaModule.Essentia || essentiaModule.default?.Essentia || essentiaModule.default;
|
|
1940
1940
|
let WASMModule = wasmModule.default || wasmModule.EssentiaWASM || wasmModule.default?.EssentiaWASM;
|
|
1941
1941
|
if (!WASMModule) {
|
|
@@ -14544,11 +14544,17 @@ class VijiCore {
|
|
|
14544
14544
|
isHeadless = false;
|
|
14545
14545
|
// Audio stream management
|
|
14546
14546
|
currentAudioStream = null;
|
|
14547
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
14548
|
+
// VIDEO STREAM INDEX CONTRACT:
|
|
14549
|
+
// Index 0: ALWAYS reserved for main video (with CV) - even when absent
|
|
14550
|
+
// Index 1..N: Additional streams (no CV) - where N = videoStreams.length
|
|
14551
|
+
// Index N+1..: Device streams - dynamically allocated, tracked in deviceVideoStreamIndices
|
|
14552
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
14547
14553
|
// Separated video stream management
|
|
14548
14554
|
videoStream = null;
|
|
14549
|
-
// Main stream (CV enabled)
|
|
14555
|
+
// Main stream (CV enabled) - always index 0
|
|
14550
14556
|
videoStreams = [];
|
|
14551
|
-
// Additional streams (no CV)
|
|
14557
|
+
// Additional streams (no CV) - indices 1..N
|
|
14552
14558
|
// Video coordinators
|
|
14553
14559
|
mainVideoCoordinator = null;
|
|
14554
14560
|
additionalCoordinators = [];
|
|
@@ -14556,7 +14562,7 @@ class VijiCore {
|
|
|
14556
14562
|
directFrameSlots = 0;
|
|
14557
14563
|
// Device video management (coordinators only, for cleanup)
|
|
14558
14564
|
deviceVideoCoordinators = /* @__PURE__ */ new Map();
|
|
14559
|
-
// Track assigned stream indices to prevent collisions
|
|
14565
|
+
// Track assigned stream indices to prevent collisions (indices start at 1 + videoStreams.length)
|
|
14560
14566
|
deviceVideoStreamIndices = /* @__PURE__ */ new Map();
|
|
14561
14567
|
// Auto-capture frame buffer (zero-copy transfer)
|
|
14562
14568
|
latestFrameBuffer = null;
|
|
@@ -16117,7 +16123,7 @@ class VijiCore {
|
|
|
16117
16123
|
async setDeviceVideo(deviceId, stream) {
|
|
16118
16124
|
this.validateReady();
|
|
16119
16125
|
await this.clearDeviceVideo(deviceId);
|
|
16120
|
-
const baseOffset =
|
|
16126
|
+
const baseOffset = 1 + this.videoStreams.length;
|
|
16121
16127
|
const usedIndices = new Set(this.deviceVideoStreamIndices.values());
|
|
16122
16128
|
let streamIndex = baseOffset;
|
|
16123
16129
|
while (usedIndices.has(streamIndex)) {
|
|
@@ -16281,4 +16287,4 @@ export {
|
|
|
16281
16287
|
VijiCoreError as b,
|
|
16282
16288
|
getDefaultExportFromCjs as g
|
|
16283
16289
|
};
|
|
16284
|
-
//# sourceMappingURL=index-
|
|
16290
|
+
//# sourceMappingURL=index-DBTm0Ys2.js.map
|