@viji-dev/core 0.3.1 → 0.3.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/dist/artist-dts-p5.js +1 -1
- package/dist/artist-dts.js +1 -1
- package/dist/artist-global.d.ts +3 -1
- package/dist/artist-js-ambient.d.ts +47 -39
- package/dist/artist-jsdoc.d.ts +47 -39
- package/dist/assets/{viji.worker-Be0jZvYj.js → viji.worker-BGYUuaFF.js} +136 -29
- package/dist/assets/viji.worker-BGYUuaFF.js.map +1 -0
- package/dist/{essentia-wasm.web-D7gmeaO3.js → essentia-wasm.web-Ca8e6Ylt.js} +2 -2
- package/dist/{essentia-wasm.web-D7gmeaO3.js.map → essentia-wasm.web-Ca8e6Ylt.js.map} +1 -1
- package/dist/{index-BV1S8Ps-.js → index-BTtBhJW4.js} +69 -10
- package/dist/index-BTtBhJW4.js.map +1 -0
- package/dist/index.d.ts +24 -1
- package/dist/index.js +1 -1
- package/dist/shader-uniforms.js +125 -0
- package/package.json +1 -1
- package/dist/assets/viji.worker-Be0jZvYj.js.map +0 -1
- package/dist/index-BV1S8Ps-.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -740,6 +740,8 @@ declare interface DeviceState extends DeviceSensorState {
|
|
|
740
740
|
id: string;
|
|
741
741
|
/** User-friendly device name */
|
|
742
742
|
name: string;
|
|
743
|
+
/** Device camera video (null if not available) */
|
|
744
|
+
video: VideoAPI | null;
|
|
743
745
|
}
|
|
744
746
|
|
|
745
747
|
export declare interface FaceData {
|
|
@@ -1253,7 +1255,7 @@ export declare const VERSION = "0.2.20";
|
|
|
1253
1255
|
|
|
1254
1256
|
export declare interface VideoAPI {
|
|
1255
1257
|
isConnected: boolean;
|
|
1256
|
-
currentFrame: OffscreenCanvas | null;
|
|
1258
|
+
currentFrame: OffscreenCanvas | ImageBitmap | null;
|
|
1257
1259
|
frameWidth: number;
|
|
1258
1260
|
frameHeight: number;
|
|
1259
1261
|
frameRate: number;
|
|
@@ -1273,6 +1275,14 @@ export declare interface VideoAPI {
|
|
|
1273
1275
|
};
|
|
1274
1276
|
}
|
|
1275
1277
|
|
|
1278
|
+
/**
|
|
1279
|
+
* Video stream categorization type
|
|
1280
|
+
* - main: Primary video with CV processing (viji.video)
|
|
1281
|
+
* - additional: Host-provided streams without CV (viji.streams[])
|
|
1282
|
+
* - device: Device-provided camera streams (device.video)
|
|
1283
|
+
*/
|
|
1284
|
+
export declare type VideoStreamType = 'main' | 'additional' | 'device';
|
|
1285
|
+
|
|
1276
1286
|
export declare interface VijiAPI {
|
|
1277
1287
|
canvas: OffscreenCanvas;
|
|
1278
1288
|
ctx?: OffscreenCanvasRenderingContext2D;
|
|
@@ -1332,6 +1342,7 @@ export declare class VijiCore {
|
|
|
1332
1342
|
private mainVideoCoordinator;
|
|
1333
1343
|
private additionalCoordinators;
|
|
1334
1344
|
private directFrameSlots;
|
|
1345
|
+
private deviceVideoCoordinators;
|
|
1335
1346
|
private latestFrameBuffer;
|
|
1336
1347
|
private autoCaptureEnabled;
|
|
1337
1348
|
private eventSourceCore;
|
|
@@ -1852,6 +1863,18 @@ export declare class VijiCore {
|
|
|
1852
1863
|
name: string;
|
|
1853
1864
|
index: number;
|
|
1854
1865
|
}>;
|
|
1866
|
+
/**
|
|
1867
|
+
* Set video stream for an external device
|
|
1868
|
+
* Device camera will appear in viji.devices[].video
|
|
1869
|
+
* @param deviceId - Device identifier
|
|
1870
|
+
* @param stream - MediaStream from device camera
|
|
1871
|
+
*/
|
|
1872
|
+
setDeviceVideo(deviceId: string, stream: MediaStream): Promise<void>;
|
|
1873
|
+
/**
|
|
1874
|
+
* Clear video stream from device
|
|
1875
|
+
* @param deviceId - Device identifier
|
|
1876
|
+
*/
|
|
1877
|
+
clearDeviceVideo(deviceId: string): Promise<void>;
|
|
1855
1878
|
/**
|
|
1856
1879
|
* Checks if the core is ready for use
|
|
1857
1880
|
*/
|
package/dist/index.js
CHANGED
package/dist/shader-uniforms.js
CHANGED
|
@@ -349,6 +349,131 @@ export const shaderUniforms = {
|
|
|
349
349
|
"category": "Video",
|
|
350
350
|
"description": "Stream 7 connection status"
|
|
351
351
|
},
|
|
352
|
+
"u_deviceCount": {
|
|
353
|
+
"type": "int",
|
|
354
|
+
"category": "Device Video Support (device cameras)",
|
|
355
|
+
"description": "Number of device videos (0-8)"
|
|
356
|
+
},
|
|
357
|
+
"u_device0": {
|
|
358
|
+
"type": "sampler2D",
|
|
359
|
+
"category": "Device Video Support (device cameras)",
|
|
360
|
+
"description": "Device 0 camera texture"
|
|
361
|
+
},
|
|
362
|
+
"u_device1": {
|
|
363
|
+
"type": "sampler2D",
|
|
364
|
+
"category": "Device Video Support (device cameras)",
|
|
365
|
+
"description": "Device 1 camera texture"
|
|
366
|
+
},
|
|
367
|
+
"u_device2": {
|
|
368
|
+
"type": "sampler2D",
|
|
369
|
+
"category": "Device Video Support (device cameras)",
|
|
370
|
+
"description": "Device 2 camera texture"
|
|
371
|
+
},
|
|
372
|
+
"u_device3": {
|
|
373
|
+
"type": "sampler2D",
|
|
374
|
+
"category": "Device Video Support (device cameras)",
|
|
375
|
+
"description": "Device 3 camera texture"
|
|
376
|
+
},
|
|
377
|
+
"u_device4": {
|
|
378
|
+
"type": "sampler2D",
|
|
379
|
+
"category": "Device Video Support (device cameras)",
|
|
380
|
+
"description": "Device 4 camera texture"
|
|
381
|
+
},
|
|
382
|
+
"u_device5": {
|
|
383
|
+
"type": "sampler2D",
|
|
384
|
+
"category": "Device Video Support (device cameras)",
|
|
385
|
+
"description": "Device 5 camera texture"
|
|
386
|
+
},
|
|
387
|
+
"u_device6": {
|
|
388
|
+
"type": "sampler2D",
|
|
389
|
+
"category": "Device Video Support (device cameras)",
|
|
390
|
+
"description": "Device 6 camera texture"
|
|
391
|
+
},
|
|
392
|
+
"u_device7": {
|
|
393
|
+
"type": "sampler2D",
|
|
394
|
+
"category": "Device Video Support (device cameras)",
|
|
395
|
+
"description": "Device 7 camera texture"
|
|
396
|
+
},
|
|
397
|
+
"u_device0Resolution": {
|
|
398
|
+
"type": "vec2",
|
|
399
|
+
"category": "Device Video Support (device cameras)",
|
|
400
|
+
"description": "Device 0 resolution"
|
|
401
|
+
},
|
|
402
|
+
"u_device1Resolution": {
|
|
403
|
+
"type": "vec2",
|
|
404
|
+
"category": "Device Video Support (device cameras)",
|
|
405
|
+
"description": "Device 1 resolution"
|
|
406
|
+
},
|
|
407
|
+
"u_device2Resolution": {
|
|
408
|
+
"type": "vec2",
|
|
409
|
+
"category": "Device Video Support (device cameras)",
|
|
410
|
+
"description": "Device 2 resolution"
|
|
411
|
+
},
|
|
412
|
+
"u_device3Resolution": {
|
|
413
|
+
"type": "vec2",
|
|
414
|
+
"category": "Device Video Support (device cameras)",
|
|
415
|
+
"description": "Device 3 resolution"
|
|
416
|
+
},
|
|
417
|
+
"u_device4Resolution": {
|
|
418
|
+
"type": "vec2",
|
|
419
|
+
"category": "Device Video Support (device cameras)",
|
|
420
|
+
"description": "Device 4 resolution"
|
|
421
|
+
},
|
|
422
|
+
"u_device5Resolution": {
|
|
423
|
+
"type": "vec2",
|
|
424
|
+
"category": "Device Video Support (device cameras)",
|
|
425
|
+
"description": "Device 5 resolution"
|
|
426
|
+
},
|
|
427
|
+
"u_device6Resolution": {
|
|
428
|
+
"type": "vec2",
|
|
429
|
+
"category": "Device Video Support (device cameras)",
|
|
430
|
+
"description": "Device 6 resolution"
|
|
431
|
+
},
|
|
432
|
+
"u_device7Resolution": {
|
|
433
|
+
"type": "vec2",
|
|
434
|
+
"category": "Device Video Support (device cameras)",
|
|
435
|
+
"description": "Device 7 resolution"
|
|
436
|
+
},
|
|
437
|
+
"u_device0Connected": {
|
|
438
|
+
"type": "bool",
|
|
439
|
+
"category": "Device Video Support (device cameras)",
|
|
440
|
+
"description": "Device 0 connection status"
|
|
441
|
+
},
|
|
442
|
+
"u_device1Connected": {
|
|
443
|
+
"type": "bool",
|
|
444
|
+
"category": "Device Video Support (device cameras)",
|
|
445
|
+
"description": "Device 1 connection status"
|
|
446
|
+
},
|
|
447
|
+
"u_device2Connected": {
|
|
448
|
+
"type": "bool",
|
|
449
|
+
"category": "Device Video Support (device cameras)",
|
|
450
|
+
"description": "Device 2 connection status"
|
|
451
|
+
},
|
|
452
|
+
"u_device3Connected": {
|
|
453
|
+
"type": "bool",
|
|
454
|
+
"category": "Device Video Support (device cameras)",
|
|
455
|
+
"description": "Device 3 connection status"
|
|
456
|
+
},
|
|
457
|
+
"u_device4Connected": {
|
|
458
|
+
"type": "bool",
|
|
459
|
+
"category": "Device Video Support (device cameras)",
|
|
460
|
+
"description": "Device 4 connection status"
|
|
461
|
+
},
|
|
462
|
+
"u_device5Connected": {
|
|
463
|
+
"type": "bool",
|
|
464
|
+
"category": "Device Video Support (device cameras)",
|
|
465
|
+
"description": "Device 5 connection status"
|
|
466
|
+
},
|
|
467
|
+
"u_device6Connected": {
|
|
468
|
+
"type": "bool",
|
|
469
|
+
"category": "Device Video Support (device cameras)",
|
|
470
|
+
"description": "Device 6 connection status"
|
|
471
|
+
},
|
|
472
|
+
"u_device7Connected": {
|
|
473
|
+
"type": "bool",
|
|
474
|
+
"category": "Device Video Support (device cameras)",
|
|
475
|
+
"description": "Device 7 connection status"
|
|
476
|
+
},
|
|
352
477
|
"u_faceCount": {
|
|
353
478
|
"type": "int",
|
|
354
479
|
"category": "CV",
|