@m4l/gclick 0.17.0 → 0.17.1-beta-refactor-gps-camera-streams-persistent-reconcile.0
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/components/CameraStreams/hooks/useStreamRequest.d.ts.map +1 -1
- package/components/CameraStreams/hooks/useStreamRequest.js +97 -87
- package/components/CameraStreams/store.d.ts.map +1 -1
- package/components/CameraStreams/store.js +119 -78
- package/components/CameraStreams/types.d.ts +12 -1
- package/components/CameraStreams/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStreamRequest.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/CameraStreams/hooks/useStreamRequest.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAqKvD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"useStreamRequest.d.ts","sourceRoot":"","sources":["../../../../../../../packages/gclick/src/components/CameraStreams/hooks/useStreamRequest.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAqKvD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,QA0SvE;AAGD,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { useMutation as
|
|
4
|
-
import
|
|
5
|
-
import { useWindowToolsMF as
|
|
6
|
-
import { useNetwork as
|
|
7
|
-
import { useCameraStreamsStore as
|
|
8
|
-
import { useCloudFrontCookieManager as
|
|
9
|
-
const
|
|
1
|
+
import { useRef as g, useCallback as A, useEffect as P } from "react";
|
|
2
|
+
import { useQuery as B } from "../../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
3
|
+
import { useMutation as O } from "../../../node_modules/@tanstack/react-query/build/modern/useMutation.js";
|
|
4
|
+
import N from "camelcase-keys";
|
|
5
|
+
import { useWindowToolsMF as j } from "@m4l/components";
|
|
6
|
+
import { useNetwork as J } from "@m4l/core";
|
|
7
|
+
import { useCameraStreamsStore as m } from "../useCameraStreamsStore.js";
|
|
8
|
+
import { useCloudFrontCookieManager as V } from "./useCloudFrontCookie.js";
|
|
9
|
+
const D = /* @__PURE__ */ new Set([
|
|
10
10
|
"executed",
|
|
11
11
|
"error",
|
|
12
12
|
"error_retries_max",
|
|
13
13
|
"channel_busy"
|
|
14
|
-
]),
|
|
15
|
-
function
|
|
14
|
+
]), G = "There is already a busy stream for this device and channel";
|
|
15
|
+
function b(t, r) {
|
|
16
16
|
try {
|
|
17
17
|
return t ? JSON.parse(t) : r;
|
|
18
18
|
} catch {
|
|
19
19
|
return r;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const r =
|
|
22
|
+
function L(t) {
|
|
23
|
+
const r = b(t, {}), s = N(r).hlsUrl;
|
|
24
24
|
return typeof s == "string" ? s : null;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function p(t) {
|
|
27
27
|
return t.replace(/^\*+|\*+$/g, "").trim();
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function M(t, r) {
|
|
30
30
|
if (typeof t == "string")
|
|
31
|
-
return t ?
|
|
31
|
+
return t ? p(t) : r;
|
|
32
32
|
if (t && typeof t == "object") {
|
|
33
33
|
const n = t;
|
|
34
34
|
if (typeof n.message == "string" && n.message)
|
|
35
|
-
return
|
|
35
|
+
return p(n.message);
|
|
36
36
|
const s = n.response?.data, o = s?.error?.message ?? s?.message;
|
|
37
37
|
if (typeof o == "string" && o)
|
|
38
|
-
return
|
|
38
|
+
return p(o);
|
|
39
39
|
}
|
|
40
40
|
return r;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function W(t) {
|
|
43
43
|
return /^[[{]/.test(t.trim());
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function $(t) {
|
|
46
46
|
let r = t;
|
|
47
47
|
for (let n = 0; n < 3 && typeof r == "string"; n += 1) {
|
|
48
|
-
const s =
|
|
48
|
+
const s = b(r, void 0);
|
|
49
49
|
if (s !== void 0) {
|
|
50
50
|
r = s;
|
|
51
51
|
continue;
|
|
52
52
|
}
|
|
53
|
-
const o =
|
|
53
|
+
const o = b(`"${r}"`, void 0);
|
|
54
54
|
if (typeof o == "string" && o !== r) {
|
|
55
55
|
r = o;
|
|
56
56
|
continue;
|
|
@@ -59,7 +59,7 @@ function V(t) {
|
|
|
59
59
|
}
|
|
60
60
|
return r;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function H(t) {
|
|
63
63
|
if (!t || typeof t != "object")
|
|
64
64
|
return null;
|
|
65
65
|
const r = t;
|
|
@@ -74,26 +74,36 @@ function D(t) {
|
|
|
74
74
|
}
|
|
75
75
|
return typeof r.msg == "string" && r.msg ? r.msg : null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function Q(t, r) {
|
|
78
78
|
const n = t.error?.message || t.body || "";
|
|
79
79
|
if (!n)
|
|
80
80
|
return r;
|
|
81
|
-
const s =
|
|
81
|
+
const s = $(n), o = H(s);
|
|
82
82
|
if (o)
|
|
83
|
-
return
|
|
84
|
-
const
|
|
85
|
-
return !
|
|
83
|
+
return p(o);
|
|
84
|
+
const i = p(typeof s == "string" ? s : n);
|
|
85
|
+
return !i || W(i) ? r : i;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Y(t) {
|
|
88
88
|
if (!t || typeof t != "object")
|
|
89
89
|
return !1;
|
|
90
90
|
const r = t, n = r.status ?? r.response?.status, s = r.message ?? r.response?.data?.message ?? "";
|
|
91
|
-
return n === 400 && s.includes(
|
|
91
|
+
return n === 400 && s.includes(G);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
const { startProgress: r, stopProgress: n } =
|
|
95
|
-
|
|
96
|
-
const
|
|
93
|
+
function oe({ playerKey: t }) {
|
|
94
|
+
const { startProgress: r, stopProgress: n } = j(), { networkOperation: s } = J(), { ensureCookies: o } = V(), i = m((e) => e.players[t]), l = m((e) => e.labels), T = m((e) => e.config.endpointVideoPlay), _ = m((e) => e.config.endpointVideoPlayback), R = m((e) => e.config.endpointDevicesCommand), w = m((e) => e.config.maxPollAttempts), c = m((e) => e.actions.setPhase), h = g(i);
|
|
95
|
+
h.current = i;
|
|
96
|
+
const k = g(!1), C = g(n);
|
|
97
|
+
C.current = n;
|
|
98
|
+
const x = A(() => {
|
|
99
|
+
k.current = !0, r();
|
|
100
|
+
}, [r]), u = A(() => {
|
|
101
|
+
k.current = !1, n();
|
|
102
|
+
}, [n]);
|
|
103
|
+
P(() => () => {
|
|
104
|
+
k.current && (k.current = !1, C.current());
|
|
105
|
+
}, []);
|
|
106
|
+
const q = h.current?.mode === "playback" ? _ : T, S = i?.phase.kind, y = i?.phase.kind === "polling" ? i.phase.commandUuid : void 0, E = g(null), U = g(null), { mutate: F } = O({
|
|
97
107
|
/**
|
|
98
108
|
* Build and submit the stream request for the current player. Snake-case
|
|
99
109
|
* conversion is mandatory: stream endpoints validate `device_id`,
|
|
@@ -101,14 +111,14 @@ function ee({ playerKey: t }) {
|
|
|
101
111
|
* drop unknown camelCase keys.
|
|
102
112
|
*/
|
|
103
113
|
mutationFn: async () => {
|
|
104
|
-
const e =
|
|
114
|
+
const e = h.current;
|
|
105
115
|
if (!e)
|
|
106
116
|
throw new Error("player-not-loaded");
|
|
107
117
|
const a = {
|
|
108
118
|
deviceId: e.unitId,
|
|
109
119
|
channelId: Number(e.channelId),
|
|
110
120
|
duration: e.durationSeconds
|
|
111
|
-
},
|
|
121
|
+
}, d = e.mode === "playback" && e.playbackParams ? {
|
|
112
122
|
...a,
|
|
113
123
|
beginTime: e.playbackParams.beginTime,
|
|
114
124
|
uuid: e.playbackParams.sourceCommandUuid,
|
|
@@ -116,17 +126,17 @@ function ee({ playerKey: t }) {
|
|
|
116
126
|
} : a;
|
|
117
127
|
return s({
|
|
118
128
|
method: "POST",
|
|
119
|
-
endPoint:
|
|
129
|
+
endPoint: q,
|
|
120
130
|
toastError: !1,
|
|
121
131
|
toastSuccess: !1,
|
|
122
132
|
responseToCamelCase: !0,
|
|
123
133
|
bodyToSnakeCase: !0,
|
|
124
|
-
data:
|
|
134
|
+
data: d
|
|
125
135
|
});
|
|
126
136
|
},
|
|
127
137
|
/** Move the player to `polling` carrying both UUIDs from the backend. */
|
|
128
138
|
onSuccess: (e) => {
|
|
129
|
-
|
|
139
|
+
U.current = e.command.deviceId, E.current = e.command.createdAt, x(), c(t, {
|
|
130
140
|
kind: "polling",
|
|
131
141
|
commandUuid: e.command.uuid,
|
|
132
142
|
streamUuid: e.stream.uuid
|
|
@@ -141,43 +151,43 @@ function ee({ playerKey: t }) {
|
|
|
141
151
|
* toasts when several tiles are played simultaneously (grid play-all).
|
|
142
152
|
*/
|
|
143
153
|
onError: (e) => {
|
|
144
|
-
if (
|
|
145
|
-
|
|
154
|
+
if (u(), Y(e)) {
|
|
155
|
+
c(t, { kind: "channelBusy" });
|
|
146
156
|
return;
|
|
147
157
|
}
|
|
148
|
-
const a =
|
|
149
|
-
|
|
158
|
+
const a = M(e, l.requestErrorUnknown);
|
|
159
|
+
c(t, { kind: "error", code: "request-failed", message: a });
|
|
150
160
|
}
|
|
151
161
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}, [
|
|
155
|
-
const { data:
|
|
156
|
-
queryKey: ["cameraStreamRequest", t,
|
|
162
|
+
P(() => {
|
|
163
|
+
S === "requesting" && F();
|
|
164
|
+
}, [S, t]);
|
|
165
|
+
const { data: I, error: v } = B({
|
|
166
|
+
queryKey: ["cameraStreamRequest", t, y],
|
|
157
167
|
/**
|
|
158
168
|
* Poll `devices/command` until the command associated with this player's
|
|
159
169
|
* `commandUuid` reaches a terminal status.
|
|
160
170
|
*/
|
|
161
|
-
queryFn: async () => !
|
|
171
|
+
queryFn: async () => !y || U.current === null || !E.current ? null : s({
|
|
162
172
|
method: "GET",
|
|
163
|
-
endPoint:
|
|
173
|
+
endPoint: R,
|
|
164
174
|
parms: {
|
|
165
|
-
deviceId:
|
|
166
|
-
createdAt:
|
|
167
|
-
uuid:
|
|
175
|
+
deviceId: U.current,
|
|
176
|
+
createdAt: E.current,
|
|
177
|
+
uuid: y
|
|
168
178
|
},
|
|
169
179
|
toastError: !1,
|
|
170
180
|
toastSuccess: !1,
|
|
171
181
|
responseToCamelCase: !0
|
|
172
182
|
}),
|
|
173
|
-
enabled: !!
|
|
183
|
+
enabled: !!y && S === "polling",
|
|
174
184
|
/**
|
|
175
185
|
* Dynamic poll interval: 1 s while the command is in flight, `false`
|
|
176
186
|
* once it reaches a terminal `statusId` or exhausts `maxPollAttempts`.
|
|
177
187
|
*/
|
|
178
188
|
refetchInterval: (e) => {
|
|
179
|
-
const a = e.state.data?.data?.statusId ?? "",
|
|
180
|
-
return
|
|
189
|
+
const a = e.state.data?.data?.statusId ?? "", d = D.has(a), f = e.state.dataUpdateCount >= w;
|
|
190
|
+
return d || f ? !1 : 1e3;
|
|
181
191
|
},
|
|
182
192
|
retry: !1,
|
|
183
193
|
refetchOnWindowFocus: !1,
|
|
@@ -185,70 +195,70 @@ function ee({ playerKey: t }) {
|
|
|
185
195
|
refetchOnMount: !1,
|
|
186
196
|
staleTime: 1 / 0
|
|
187
197
|
});
|
|
188
|
-
return
|
|
189
|
-
const e =
|
|
198
|
+
return P(() => {
|
|
199
|
+
const e = I?.data;
|
|
190
200
|
if (!e)
|
|
191
201
|
return;
|
|
192
|
-
const a =
|
|
202
|
+
const a = h.current;
|
|
193
203
|
if (!(!a || a.phase.kind !== "polling")) {
|
|
194
204
|
if (e.statusId === "executed") {
|
|
195
|
-
const
|
|
196
|
-
if (!
|
|
197
|
-
|
|
205
|
+
const d = L(e.response);
|
|
206
|
+
if (!d) {
|
|
207
|
+
c(t, { kind: "error", code: "missing-hls-url", message: l.playerErrorPlayback }), u();
|
|
198
208
|
return;
|
|
199
209
|
}
|
|
200
|
-
const
|
|
201
|
-
|
|
210
|
+
const f = () => {
|
|
211
|
+
c(t, {
|
|
202
212
|
kind: "streaming",
|
|
203
213
|
commandUuid: a.phase.kind === "polling" ? a.phase.commandUuid : "",
|
|
204
214
|
streamUuid: a.phase.kind === "polling" ? a.phase.streamUuid : "",
|
|
205
|
-
hlsUrl:
|
|
206
|
-
}),
|
|
215
|
+
hlsUrl: d
|
|
216
|
+
}), u();
|
|
207
217
|
};
|
|
208
|
-
o().then(
|
|
218
|
+
o().then(f).catch(f);
|
|
209
219
|
return;
|
|
210
220
|
}
|
|
211
221
|
if (e.statusId === "channel_busy") {
|
|
212
|
-
|
|
222
|
+
c(t, { kind: "channelBusy" }), u();
|
|
213
223
|
return;
|
|
214
224
|
}
|
|
215
225
|
if (e.statusId === "error") {
|
|
216
|
-
const
|
|
226
|
+
const d = b(e.response, {
|
|
217
227
|
error: { origin: "", message: "", status: 0, agent: "" },
|
|
218
228
|
body: ""
|
|
219
|
-
}),
|
|
220
|
-
|
|
229
|
+
}), f = Q(d, l.playerErrorPlayback);
|
|
230
|
+
c(t, {
|
|
221
231
|
kind: "error",
|
|
222
232
|
code: "remote-error",
|
|
223
|
-
message:
|
|
224
|
-
}),
|
|
233
|
+
message: f
|
|
234
|
+
}), u();
|
|
225
235
|
return;
|
|
226
236
|
}
|
|
227
237
|
if (e.statusId === "error_retries_max") {
|
|
228
|
-
|
|
238
|
+
c(t, { kind: "timeout" }), u();
|
|
229
239
|
return;
|
|
230
240
|
}
|
|
231
241
|
}
|
|
232
242
|
}, [
|
|
233
|
-
|
|
243
|
+
I,
|
|
234
244
|
t,
|
|
235
|
-
|
|
245
|
+
l.playerErrorPlayback,
|
|
236
246
|
o,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
]),
|
|
240
|
-
if (!
|
|
247
|
+
c,
|
|
248
|
+
u
|
|
249
|
+
]), P(() => {
|
|
250
|
+
if (!v)
|
|
241
251
|
return;
|
|
242
|
-
const e =
|
|
243
|
-
|
|
252
|
+
const e = M(v, l.requestErrorUnknownPolling);
|
|
253
|
+
c(t, { kind: "error", code: "polling-failed", message: e }), u();
|
|
244
254
|
}, [
|
|
245
|
-
|
|
255
|
+
v,
|
|
246
256
|
t,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
257
|
+
l.requestErrorUnknownPolling,
|
|
258
|
+
c,
|
|
259
|
+
u
|
|
250
260
|
]), void 0;
|
|
251
261
|
}
|
|
252
262
|
export {
|
|
253
|
-
|
|
263
|
+
oe as useStreamRequest
|
|
254
264
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/CameraStreams/store.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/CameraStreams/store.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAIjC,MAAM,SAAS,CAAC;AAsCjB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAW,2BAA2B;;;;;;;;CAuR9E,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { createStore as
|
|
2
|
-
import { devtools as
|
|
3
|
-
import { immer as
|
|
4
|
-
import { DEFAULT_CAMERA_STREAMS_DURATION_SECONDS as
|
|
5
|
-
import { buildPlayerKey as
|
|
6
|
-
const
|
|
1
|
+
import { createStore as I } from "zustand";
|
|
2
|
+
import { devtools as L } from "zustand/middleware";
|
|
3
|
+
import { immer as A } from "zustand/middleware/immer";
|
|
4
|
+
import { DEFAULT_CAMERA_STREAMS_DURATION_SECONDS as D } from "./constants.js";
|
|
5
|
+
import { buildPlayerKey as m } from "./types.js";
|
|
6
|
+
const h = /* @__PURE__ */ new Set([
|
|
7
7
|
"requesting",
|
|
8
8
|
"polling",
|
|
9
9
|
"streaming"
|
|
10
10
|
]);
|
|
11
|
-
function
|
|
11
|
+
function S(t) {
|
|
12
12
|
return {
|
|
13
|
-
unitId:
|
|
14
|
-
cameraId:
|
|
15
|
-
channelId:
|
|
16
|
-
cameraLabel:
|
|
17
|
-
mode:
|
|
13
|
+
unitId: t.unitId,
|
|
14
|
+
cameraId: t.cameraId,
|
|
15
|
+
channelId: t.channelId,
|
|
16
|
+
cameraLabel: t.cameraLabel,
|
|
17
|
+
mode: t.mode,
|
|
18
18
|
phase: { kind: "idle" },
|
|
19
|
-
durationSeconds:
|
|
19
|
+
durationSeconds: t.durationSeconds
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
config:
|
|
28
|
-
labels:
|
|
29
|
-
defaultDurationSeconds:
|
|
30
|
-
defaultMode:
|
|
22
|
+
const O = (t) => {
|
|
23
|
+
const b = t.labels, k = t.defaultDurationSeconds ?? D, E = t.defaultMode ?? "live";
|
|
24
|
+
return I(
|
|
25
|
+
L(
|
|
26
|
+
A((s, d) => ({
|
|
27
|
+
config: t.config,
|
|
28
|
+
labels: b,
|
|
29
|
+
defaultDurationSeconds: k,
|
|
30
|
+
defaultMode: E,
|
|
31
31
|
loadStatus: "idle",
|
|
32
32
|
players: {},
|
|
33
33
|
actions: {
|
|
@@ -39,39 +39,80 @@ const U = (o) => {
|
|
|
39
39
|
*/
|
|
40
40
|
load: async (e) => {
|
|
41
41
|
if (e.length === 0) {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
s((r) => {
|
|
43
|
+
r.loadStatus = "ready";
|
|
44
44
|
});
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
s((r) => {
|
|
48
|
+
r.loadStatus = "loading";
|
|
49
49
|
});
|
|
50
50
|
try {
|
|
51
|
-
const { config:
|
|
52
|
-
e.map((
|
|
51
|
+
const { config: r } = d(), o = d().defaultDurationSeconds, n = d().defaultMode, a = await Promise.all(
|
|
52
|
+
e.map((i) => r.resolveCameras(i).then((l) => ({ unitId: i, cameras: l })))
|
|
53
53
|
);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const p =
|
|
58
|
-
|
|
59
|
-
unitId:
|
|
54
|
+
s((i) => {
|
|
55
|
+
a.forEach(({ unitId: l, cameras: c }) => {
|
|
56
|
+
c.forEach((u) => {
|
|
57
|
+
const p = u.id, f = u.id, y = m(l, p, f);
|
|
58
|
+
i.players[y] || (i.players[y] = S({
|
|
59
|
+
unitId: l,
|
|
60
60
|
cameraId: p,
|
|
61
|
-
channelId:
|
|
62
|
-
cameraLabel:
|
|
63
|
-
mode:
|
|
64
|
-
durationSeconds:
|
|
61
|
+
channelId: f,
|
|
62
|
+
cameraLabel: u.label,
|
|
63
|
+
mode: n,
|
|
64
|
+
durationSeconds: o
|
|
65
65
|
}));
|
|
66
66
|
});
|
|
67
|
-
}),
|
|
67
|
+
}), i.loadStatus = "ready";
|
|
68
68
|
});
|
|
69
69
|
} catch {
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
s((r) => {
|
|
71
|
+
r.loadStatus = "error";
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
+
/**
|
|
76
|
+
* Reconcile the players of one `unitId` against an already-resolved
|
|
77
|
+
* camera set (push model). Three-way diff in a single immer pass:
|
|
78
|
+
* - ADD: a new `(unitId, cameraId, channelId)` gets a fresh `idle`
|
|
79
|
+
* slice (same shape `load` builds).
|
|
80
|
+
* - KEEP: a surviving player is left untouched — its `phase` (a live
|
|
81
|
+
* `streaming`/`polling` request included), `playbackParams` and
|
|
82
|
+
* `durationSeconds` are preserved — and only its `cameraLabel` is
|
|
83
|
+
* refreshed in place when the alias changed (safe: never touches
|
|
84
|
+
* `phase`, so a relabel does not interrupt a stream).
|
|
85
|
+
* - REMOVE: a player of THIS unit whose channel disappeared from the
|
|
86
|
+
* set is deleted (the engine then unmounts exactly that runner).
|
|
87
|
+
* Other units are not touched, so a multi-unit store stays isolated.
|
|
88
|
+
* `loadStatus` settles to `ready`, mirroring `load`.
|
|
89
|
+
*/
|
|
90
|
+
reconcile: (e, r) => {
|
|
91
|
+
const o = d().defaultMode, n = d().defaultDurationSeconds;
|
|
92
|
+
s((a) => {
|
|
93
|
+
const i = /* @__PURE__ */ new Set();
|
|
94
|
+
r.forEach((l) => {
|
|
95
|
+
const c = l.id, u = l.id, p = m(e, c, u);
|
|
96
|
+
i.add(p);
|
|
97
|
+
const f = a.players[p];
|
|
98
|
+
if (f) {
|
|
99
|
+
f.cameraLabel !== l.label && (f.cameraLabel = l.label);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
a.players[p] = S({
|
|
103
|
+
unitId: e,
|
|
104
|
+
cameraId: c,
|
|
105
|
+
channelId: u,
|
|
106
|
+
cameraLabel: l.label,
|
|
107
|
+
mode: o,
|
|
108
|
+
durationSeconds: n
|
|
109
|
+
});
|
|
110
|
+
}), Object.keys(a.players).forEach((l) => {
|
|
111
|
+
const c = a.players[l];
|
|
112
|
+
c && c.unitId === e && !i.has(l) && delete a.players[l];
|
|
113
|
+
}), a.loadStatus = "ready";
|
|
114
|
+
});
|
|
115
|
+
},
|
|
75
116
|
/**
|
|
76
117
|
* Kick off a fresh stream request for one player. Idempotent: clicks
|
|
77
118
|
* on a player already `requesting`, `polling`, or `streaming` are
|
|
@@ -79,11 +120,11 @@ const U = (o) => {
|
|
|
79
120
|
* `durationSeconds` when provided so a custom value persists for
|
|
80
121
|
* subsequent `replay` calls on the same player.
|
|
81
122
|
*/
|
|
82
|
-
play: (e,
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
123
|
+
play: (e, r) => {
|
|
124
|
+
const o = d().players[e];
|
|
125
|
+
o && (h.has(o.phase.kind) || s((n) => {
|
|
126
|
+
const a = n.players[e];
|
|
127
|
+
a && (r !== void 0 && (a.durationSeconds = r), a.phase = { kind: "requesting" });
|
|
87
128
|
}));
|
|
88
129
|
},
|
|
89
130
|
/**
|
|
@@ -92,11 +133,11 @@ const U = (o) => {
|
|
|
92
133
|
* players stream is safe.
|
|
93
134
|
*/
|
|
94
135
|
playAll: (e) => {
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
|
|
136
|
+
const r = Object.keys(d().players);
|
|
137
|
+
s((o) => {
|
|
138
|
+
r.forEach((n) => {
|
|
139
|
+
const a = o.players[n];
|
|
140
|
+
a && (h.has(a.phase.kind) || (e !== void 0 && (a.durationSeconds = e), a.phase = { kind: "requesting" }));
|
|
100
141
|
});
|
|
101
142
|
});
|
|
102
143
|
},
|
|
@@ -108,13 +149,13 @@ const U = (o) => {
|
|
|
108
149
|
* `beginTime` must re-request even from `streaming`. (No-op only if
|
|
109
150
|
* the player is missing.)
|
|
110
151
|
*/
|
|
111
|
-
playSegment: (e,
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
if (!
|
|
152
|
+
playSegment: (e, r) => {
|
|
153
|
+
d().players[e] && s((n) => {
|
|
154
|
+
const a = n.players[e];
|
|
155
|
+
if (!a)
|
|
115
156
|
return;
|
|
116
|
-
const { durationSeconds:
|
|
117
|
-
|
|
157
|
+
const { durationSeconds: i, ...l } = r;
|
|
158
|
+
a.playbackParams = l, i !== void 0 && (a.durationSeconds = i), a.phase = { kind: "requesting" };
|
|
118
159
|
});
|
|
119
160
|
},
|
|
120
161
|
/**
|
|
@@ -124,9 +165,9 @@ const U = (o) => {
|
|
|
124
165
|
* the React Query cache.
|
|
125
166
|
*/
|
|
126
167
|
replay: (e) => {
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
168
|
+
d().players[e] && s((o) => {
|
|
169
|
+
const n = o.players[e];
|
|
170
|
+
n && (n.phase = { kind: "requesting" });
|
|
130
171
|
});
|
|
131
172
|
},
|
|
132
173
|
/**
|
|
@@ -137,13 +178,13 @@ const U = (o) => {
|
|
|
137
178
|
* already hit `stop` or `replay`) must not clobber the new phase.
|
|
138
179
|
*/
|
|
139
180
|
markEnded: (e) => {
|
|
140
|
-
const
|
|
141
|
-
!
|
|
142
|
-
const
|
|
143
|
-
if (!
|
|
181
|
+
const r = d().players[e];
|
|
182
|
+
!r || r.phase.kind !== "streaming" || s((o) => {
|
|
183
|
+
const n = o.players[e];
|
|
184
|
+
if (!n || n.phase.kind !== "streaming")
|
|
144
185
|
return;
|
|
145
|
-
const { commandUuid:
|
|
146
|
-
|
|
186
|
+
const { commandUuid: a, streamUuid: i, hlsUrl: l } = n.phase;
|
|
187
|
+
n.phase = { kind: "ended", commandUuid: a, streamUuid: i, hlsUrl: l };
|
|
147
188
|
});
|
|
148
189
|
},
|
|
149
190
|
/**
|
|
@@ -152,16 +193,16 @@ const U = (o) => {
|
|
|
152
193
|
* state per the user's decision).
|
|
153
194
|
*/
|
|
154
195
|
stop: (e) => {
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
196
|
+
d().players[e] && s((o) => {
|
|
197
|
+
const n = o.players[e];
|
|
198
|
+
n && (n.phase = { kind: "idle" });
|
|
158
199
|
});
|
|
159
200
|
},
|
|
160
201
|
/** Return every player to `idle`. */
|
|
161
202
|
stopAll: () => {
|
|
162
|
-
|
|
163
|
-
Object.values(e.players).forEach((
|
|
164
|
-
|
|
203
|
+
s((e) => {
|
|
204
|
+
Object.values(e.players).forEach((r) => {
|
|
205
|
+
r.phase = { kind: "idle" };
|
|
165
206
|
});
|
|
166
207
|
});
|
|
167
208
|
},
|
|
@@ -172,7 +213,7 @@ const U = (o) => {
|
|
|
172
213
|
* removal in `load`, which only merges).
|
|
173
214
|
*/
|
|
174
215
|
reset: () => {
|
|
175
|
-
|
|
216
|
+
s((e) => {
|
|
176
217
|
e.players = {}, e.loadStatus = "idle";
|
|
177
218
|
});
|
|
178
219
|
},
|
|
@@ -182,10 +223,10 @@ const U = (o) => {
|
|
|
182
223
|
* — exposed here because the engine runs inside the provider and
|
|
183
224
|
* needs a single seam to update phases.
|
|
184
225
|
*/
|
|
185
|
-
setPhase: (e,
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
226
|
+
setPhase: (e, r) => {
|
|
227
|
+
d().players[e] && s((n) => {
|
|
228
|
+
const a = n.players[e];
|
|
229
|
+
a && (a.phase = r);
|
|
189
230
|
});
|
|
190
231
|
}
|
|
191
232
|
}
|
|
@@ -195,5 +236,5 @@ const U = (o) => {
|
|
|
195
236
|
);
|
|
196
237
|
};
|
|
197
238
|
export {
|
|
198
|
-
|
|
239
|
+
O as createCameraStreamsStore
|
|
199
240
|
};
|
|
@@ -161,6 +161,17 @@ export interface CameraStreamsActions {
|
|
|
161
161
|
* streams are not interrupted when the same unit re-loads.
|
|
162
162
|
*/
|
|
163
163
|
load: (unitIds: number[]) => Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* Declarative seam: reconcile the players of one `unitId` against a fresh
|
|
166
|
+
* camera set (already resolved by the caller — push, not pull). Adds an
|
|
167
|
+
* `idle` slice for each new channel, drops players of that unit whose channel
|
|
168
|
+
* disappeared, and leaves surviving players untouched (their phase, playback
|
|
169
|
+
* params and live stream), refreshing only the label in place. Unlike `load`
|
|
170
|
+
* (merge-only, never removes) this lets a consumer react to a changing camera
|
|
171
|
+
* set without remounting the provider. Scoped to `unitId` so a multi-unit
|
|
172
|
+
* store is not affected.
|
|
173
|
+
*/
|
|
174
|
+
reconcile: (unitId: number, cameras: CameraMeta[]) => void;
|
|
164
175
|
/**
|
|
165
176
|
* Start a stream for one player. No-op when the player is already in
|
|
166
177
|
* `requesting`, `polling`, or `streaming` (idempotency per R2). Optionally
|
|
@@ -282,7 +293,7 @@ export interface CameraStreamsProviderProps extends InitialCameraStreamsStorePro
|
|
|
282
293
|
export interface UseCameraStreamsResult {
|
|
283
294
|
players: Record<PlayerKey, CameraStreamState>;
|
|
284
295
|
loadStatus: LoadStatus;
|
|
285
|
-
actions: Pick<CameraStreamsActions, 'load' | 'play' | 'playAll' | 'playSegment' | 'replay' | 'stop' | 'stopAll' | 'reset'>;
|
|
296
|
+
actions: Pick<CameraStreamsActions, 'load' | 'reconcile' | 'play' | 'playAll' | 'playSegment' | 'replay' | 'stop' | 'stopAll' | 'reset'>;
|
|
286
297
|
}
|
|
287
298
|
/**
|
|
288
299
|
* Live playback status of one player, derived on demand from its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/CameraStreams/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,gFAAgF;AAChF,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAA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AiB,CAAC,CAAC;IAC9C,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,IAAI,CACX,oBAAoB,EACpB,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick/src/components/CameraStreams/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,gFAAgF;AAChF,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UA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