@camera.ui/browser 0.0.129 → 0.0.131
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/index.d.ts +16 -2
- package/dist/index.js +23 -7
- package/package.json +12 -11
package/dist/index.d.ts
CHANGED
|
@@ -434,9 +434,14 @@ export declare class NamespaceManager {
|
|
|
434
434
|
pluginChildRpc: `plugin.${pluginId}.child.rpc`,
|
|
435
435
|
pluginChild: `plugin.${pluginId}.child`,
|
|
436
436
|
pluginStorageRpc: `plugin.${pluginId}.storage.rpc`,
|
|
437
|
+
pluginConfigStoreRpc: `plugin.${pluginId}.configstore.rpc`,
|
|
437
438
|
};
|
|
438
439
|
}
|
|
439
440
|
|
|
441
|
+
static pluginFileServeRpc(pluginId: string): string {
|
|
442
|
+
return `plugin.${pluginId}.fileserve.rpc`;
|
|
443
|
+
}
|
|
444
|
+
|
|
440
445
|
static cameraNamespaces(cameraId: string): CameraNamespaces {
|
|
441
446
|
return {
|
|
442
447
|
cameraSubject: `camera.${cameraId}.subscriber`,
|
|
@@ -524,13 +529,21 @@ export declare class NamespaceManager {
|
|
|
524
529
|
return `worker.${agentId}.rpc`;
|
|
525
530
|
}
|
|
526
531
|
|
|
527
|
-
static
|
|
528
|
-
return 'workers.
|
|
532
|
+
static workerManagerRpc(): string {
|
|
533
|
+
return 'workers.manager.rpc';
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
static workerSync(agentId: string): string {
|
|
537
|
+
return `worker.${agentId}.sync`;
|
|
529
538
|
}
|
|
530
539
|
|
|
531
540
|
static workerDisconnect(): string {
|
|
532
541
|
return 'workers.disconnect';
|
|
533
542
|
}
|
|
543
|
+
|
|
544
|
+
static workerLogs(): string {
|
|
545
|
+
return 'workers.logs';
|
|
546
|
+
}
|
|
534
547
|
}
|
|
535
548
|
|
|
536
549
|
export { NatsStatus }
|
|
@@ -566,6 +579,7 @@ export declare interface PluginNamespaces {
|
|
|
566
579
|
pluginChildRpc: string;
|
|
567
580
|
pluginChild: string;
|
|
568
581
|
pluginStorageRpc: string;
|
|
582
|
+
pluginConfigStoreRpc: string;
|
|
569
583
|
}
|
|
570
584
|
|
|
571
585
|
export declare interface PluginSensorNamespaces {
|
package/dist/index.js
CHANGED
|
@@ -120,9 +120,13 @@ var NamespaceManager = class {
|
|
|
120
120
|
pluginDeviceManagerSubject: `plugin.${pluginId}.deviceManager.subscriber`,
|
|
121
121
|
pluginChildRpc: `plugin.${pluginId}.child.rpc`,
|
|
122
122
|
pluginChild: `plugin.${pluginId}.child`,
|
|
123
|
-
pluginStorageRpc: `plugin.${pluginId}.storage.rpc
|
|
123
|
+
pluginStorageRpc: `plugin.${pluginId}.storage.rpc`,
|
|
124
|
+
pluginConfigStoreRpc: `plugin.${pluginId}.configstore.rpc`
|
|
124
125
|
};
|
|
125
126
|
}
|
|
127
|
+
static pluginFileServeRpc(pluginId) {
|
|
128
|
+
return `plugin.${pluginId}.fileserve.rpc`;
|
|
129
|
+
}
|
|
126
130
|
static cameraNamespaces(cameraId) {
|
|
127
131
|
return {
|
|
128
132
|
cameraSubject: `camera.${cameraId}.subscriber`,
|
|
@@ -182,12 +186,18 @@ var NamespaceManager = class {
|
|
|
182
186
|
static workerAgentRpc(agentId) {
|
|
183
187
|
return `worker.${agentId}.rpc`;
|
|
184
188
|
}
|
|
185
|
-
static
|
|
186
|
-
return "workers.
|
|
189
|
+
static workerManagerRpc() {
|
|
190
|
+
return "workers.manager.rpc";
|
|
191
|
+
}
|
|
192
|
+
static workerSync(agentId) {
|
|
193
|
+
return `worker.${agentId}.sync`;
|
|
187
194
|
}
|
|
188
195
|
static workerDisconnect() {
|
|
189
196
|
return "workers.disconnect";
|
|
190
197
|
}
|
|
198
|
+
static workerLogs() {
|
|
199
|
+
return "workers.logs";
|
|
200
|
+
}
|
|
191
201
|
};
|
|
192
202
|
//#endregion
|
|
193
203
|
//#region src/composables/useRpc.ts
|
|
@@ -1297,7 +1307,8 @@ function useSensorById(camera, sensorId) {
|
|
|
1297
1307
|
() => toValue(sensorId)
|
|
1298
1308
|
], async ([connected, camId, senId]) => {
|
|
1299
1309
|
if (connected && camId && senId) {
|
|
1300
|
-
|
|
1310
|
+
const manager = await ensureSensorManager(state, cameraUi, connected, camId, _isLoading, error);
|
|
1311
|
+
sensor.value = manager?.getSensor(senId);
|
|
1301
1312
|
initialLoadDone.value = true;
|
|
1302
1313
|
} else {
|
|
1303
1314
|
cleanupSensorComposable(state);
|
|
@@ -1328,7 +1339,8 @@ function useSensorByType(camera, sensorType) {
|
|
|
1328
1339
|
() => toValue(sensorType)
|
|
1329
1340
|
], async ([connected, camId, type]) => {
|
|
1330
1341
|
if (connected && camId) {
|
|
1331
|
-
|
|
1342
|
+
const manager = await ensureSensorManager(state, cameraUi, connected, camId, _isLoading, error);
|
|
1343
|
+
sensor.value = manager?.getSensorsByType(type)[0];
|
|
1332
1344
|
initialLoadDone.value = true;
|
|
1333
1345
|
} else {
|
|
1334
1346
|
cleanupSensorComposable(state);
|
|
@@ -1441,7 +1453,10 @@ function useTypedSensor(camera, sensorType) {
|
|
|
1441
1453
|
if (!cachedManager.value) return void 0;
|
|
1442
1454
|
return cachedManager.value.getSensorsByType(sensorType)[0]?.id;
|
|
1443
1455
|
}, () => {
|
|
1444
|
-
if (cachedManager.value)
|
|
1456
|
+
if (cachedManager.value) {
|
|
1457
|
+
const sensors = cachedManager.value.getSensorsByType(sensorType);
|
|
1458
|
+
sensor.value = sensors[0];
|
|
1459
|
+
}
|
|
1445
1460
|
});
|
|
1446
1461
|
tryOnScopeDispose(() => {
|
|
1447
1462
|
cleanupSensorComposable(state);
|
|
@@ -2568,7 +2583,8 @@ function createWebRTCHandler(options) {
|
|
|
2568
2583
|
const connectionState = peerConnection.connectionState;
|
|
2569
2584
|
if (connectionState === "connected") {
|
|
2570
2585
|
state.isConnected = true;
|
|
2571
|
-
|
|
2586
|
+
const stream = new MediaStream(peerConnection.getTransceivers().filter((tr) => tr.currentDirection === "recvonly").map((tr) => tr.receiver.track));
|
|
2587
|
+
onConnected(stream);
|
|
2572
2588
|
} else if (connectionState === "failed") {
|
|
2573
2589
|
state.isConnected = false;
|
|
2574
2590
|
onFailed();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.131",
|
|
4
4
|
"description": "camera.ui browser client",
|
|
5
5
|
"author": "seydx (https://github.com/cameraui/clients)",
|
|
6
6
|
"type": "module",
|
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "rimraf dist && vite build",
|
|
19
|
+
"build": "npm run install:cui && rimraf dist && vite build",
|
|
20
20
|
"build:types": "vue-tsc --noEmit --declaration false --declarationMap false",
|
|
21
21
|
"dev": "vite build --watch",
|
|
22
22
|
"format": "prettier --write 'src/' --ignore-unknown --no-error-on-unmatched-pattern",
|
|
23
|
+
"install:cui": "cd ../../externals/camera.ui/server && npm i --save --ignore-scripts && cd ../../../clients/browser",
|
|
23
24
|
"install-updates": "npm i --save",
|
|
24
25
|
"lint": "eslint --fix .",
|
|
25
26
|
"prepublishOnly": "npm i --package-lock-only && npm run lint && npm run format && npm run build",
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"@camera.ui/logger": ">=0.0.2",
|
|
32
33
|
"@camera.ui/rpc": ">=1.0.9",
|
|
33
|
-
"@camera.ui/sdk": ">=0.0.
|
|
34
|
+
"@camera.ui/sdk": ">=0.0.15",
|
|
34
35
|
"@camera.ui/transport": ">=0.0.1",
|
|
35
36
|
"@vueuse/core": ">=14.3.0",
|
|
36
37
|
"vue": ">=3.5.39"
|
|
@@ -38,33 +39,33 @@
|
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@camera.ui/logger": "file:../../packages/logger",
|
|
40
41
|
"@camera.ui/rpc": "^1.0.9",
|
|
41
|
-
"@camera.ui/sdk": "~0.0.
|
|
42
|
+
"@camera.ui/sdk": "~0.0.15",
|
|
42
43
|
"@camera.ui/transport": "file:../../packages/transport",
|
|
43
44
|
"@eneris/push-receiver": "^4.3.1",
|
|
44
45
|
"@microsoft/api-extractor": "^7.58.9",
|
|
45
46
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
46
47
|
"@types/webrtc": "^0.0.47",
|
|
47
|
-
"@typescript-eslint/parser": "^8.
|
|
48
|
+
"@typescript-eslint/parser": "^8.63.0",
|
|
48
49
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
49
50
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
50
51
|
"@vue/eslint-config-typescript": "^14.9.0",
|
|
51
|
-
"@vue/language-core": "^3.3.
|
|
52
|
+
"@vue/language-core": "^3.3.7",
|
|
52
53
|
"@vue/tsconfig": "^0.9.1",
|
|
53
54
|
"@vueuse/core": "^14.3.0",
|
|
54
55
|
"@webgpu/types": "^0.1.71",
|
|
55
56
|
"eslint": "9.39.2",
|
|
56
57
|
"eslint-plugin-vue": "^10.9.2",
|
|
57
58
|
"globals": "^17.7.0",
|
|
58
|
-
"prettier": "^3.9.
|
|
59
|
+
"prettier": "^3.9.5",
|
|
59
60
|
"rimraf": "^6.1.3",
|
|
60
61
|
"typescript": "5.9.3",
|
|
61
|
-
"typescript-eslint": "^8.
|
|
62
|
+
"typescript-eslint": "^8.63.0",
|
|
62
63
|
"unplugin-dts": "^1.0.3",
|
|
63
64
|
"updates": "^17.18.2",
|
|
64
|
-
"vite": "^8.1.
|
|
65
|
-
"vitest": "^4.1.
|
|
65
|
+
"vite": "^8.1.4",
|
|
66
|
+
"vitest": "^4.1.10",
|
|
66
67
|
"vue": "^3.5.39",
|
|
67
|
-
"vue-tsc": "^3.3.
|
|
68
|
+
"vue-tsc": "^3.3.7"
|
|
68
69
|
},
|
|
69
70
|
"overrides": {
|
|
70
71
|
"@vue/language-core": "$@vue/language-core"
|