@viji-dev/core 0.3.5 → 0.3.6
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-FGKsBwO8.js → viji.worker-C3iqy9t2.js} +33 -12
- package/dist/assets/{viji.worker-FGKsBwO8.js.map → viji.worker-C3iqy9t2.js.map} +1 -1
- package/dist/{essentia-wasm.web-mZ_riZrA.js → essentia-wasm.web-BzzJsZX8.js} +2 -2
- package/dist/{essentia-wasm.web-mZ_riZrA.js.map → essentia-wasm.web-BzzJsZX8.js.map} +1 -1
- package/dist/{index-CMwmJb5J.js → index-DwVxY2zV.js} +3 -3
- package/dist/{index-CMwmJb5J.js.map → index-DwVxY2zV.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -3963,7 +3963,11 @@ class VijiWorkerRuntime {
|
|
|
3963
3963
|
this.deviceVideoMap.set(deviceId, index);
|
|
3964
3964
|
const device = this.viji.devices.find((d) => d.id === deviceId);
|
|
3965
3965
|
if (device) {
|
|
3966
|
-
device.video
|
|
3966
|
+
if (device.video) {
|
|
3967
|
+
Object.assign(device.video, videoSystem.getVideoAPI());
|
|
3968
|
+
} else {
|
|
3969
|
+
device.video = videoSystem.getVideoAPI();
|
|
3970
|
+
}
|
|
3967
3971
|
}
|
|
3968
3972
|
}
|
|
3969
3973
|
break;
|
|
@@ -3985,7 +3989,11 @@ class VijiWorkerRuntime {
|
|
|
3985
3989
|
if (deviceId) {
|
|
3986
3990
|
const device = this.viji.devices.find((d) => d.id === deviceId);
|
|
3987
3991
|
if (device) {
|
|
3988
|
-
device.video
|
|
3992
|
+
if (device.video) {
|
|
3993
|
+
Object.assign(device.video, vs.getVideoAPI());
|
|
3994
|
+
} else {
|
|
3995
|
+
device.video = vs.getVideoAPI();
|
|
3996
|
+
}
|
|
3989
3997
|
}
|
|
3990
3998
|
}
|
|
3991
3999
|
}
|
|
@@ -4018,7 +4026,11 @@ class VijiWorkerRuntime {
|
|
|
4018
4026
|
} else if (streamType === "device" && deviceId) {
|
|
4019
4027
|
const device = this.viji.devices.find((d) => d.id === deviceId);
|
|
4020
4028
|
if (device) {
|
|
4021
|
-
device.video
|
|
4029
|
+
if (device.video) {
|
|
4030
|
+
Object.assign(device.video, vs.getVideoAPI());
|
|
4031
|
+
} else {
|
|
4032
|
+
device.video = vs.getVideoAPI();
|
|
4033
|
+
}
|
|
4022
4034
|
}
|
|
4023
4035
|
}
|
|
4024
4036
|
}
|
|
@@ -4263,15 +4275,24 @@ class VijiWorkerRuntime {
|
|
|
4263
4275
|
handleDeviceStateUpdate(message) {
|
|
4264
4276
|
this.deviceState = message.data;
|
|
4265
4277
|
this.viji.device = this.deviceState.device;
|
|
4266
|
-
const
|
|
4267
|
-
const
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4278
|
+
const updatedDevices = this.deviceState.devices.map((deviceData) => {
|
|
4279
|
+
const existingDevice = this.viji.devices.find((d) => d.id === deviceData.id);
|
|
4280
|
+
if (existingDevice) {
|
|
4281
|
+
existingDevice.name = deviceData.name;
|
|
4282
|
+
existingDevice.motion = deviceData.motion;
|
|
4283
|
+
existingDevice.orientation = deviceData.orientation;
|
|
4284
|
+
existingDevice.geolocation = deviceData.geolocation;
|
|
4285
|
+
return existingDevice;
|
|
4286
|
+
} else {
|
|
4287
|
+
const streamIndex = this.deviceVideoMap.get(deviceData.id);
|
|
4288
|
+
const videoSystem = streamIndex !== void 0 ? this.videoSystems[streamIndex] : void 0;
|
|
4289
|
+
return {
|
|
4290
|
+
...deviceData,
|
|
4291
|
+
video: videoSystem ? videoSystem.getVideoAPI() : null
|
|
4292
|
+
};
|
|
4293
|
+
}
|
|
4273
4294
|
});
|
|
4274
|
-
this.viji.devices =
|
|
4295
|
+
this.viji.devices = updatedDevices;
|
|
4275
4296
|
}
|
|
4276
4297
|
}
|
|
4277
4298
|
class SceneAnalyzer {
|
|
@@ -4338,4 +4359,4 @@ async function setSceneCode(sceneCode) {
|
|
|
4338
4359
|
}
|
|
4339
4360
|
}
|
|
4340
4361
|
self.setSceneCode = setSceneCode;
|
|
4341
|
-
//# sourceMappingURL=viji.worker-
|
|
4362
|
+
//# sourceMappingURL=viji.worker-C3iqy9t2.js.map
|