@optifye/dashboard-core 6.12.17 → 6.12.18
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.js +9 -3
- package/dist/index.mjs +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37822,10 +37822,16 @@ var VideoGridView = React144__namespace.default.memo(({
|
|
|
37822
37822
|
const ids = workspaces.map((ws) => ws.workspace_uuid || ws.workspace_name);
|
|
37823
37823
|
return ids.sort().join(",");
|
|
37824
37824
|
}, [workspaces]);
|
|
37825
|
+
const [resolvedStreamWorkspaceKey, setResolvedStreamWorkspaceKey] = React144.useState(() => videoStreamsLoading ? null : workspaceIdsKey);
|
|
37825
37826
|
React144.useEffect(() => {
|
|
37826
37827
|
setFailedStreams(/* @__PURE__ */ new Set());
|
|
37827
37828
|
setR2FallbackWorkspaces(/* @__PURE__ */ new Set());
|
|
37828
37829
|
}, [workspaceIdsKey]);
|
|
37830
|
+
React144.useEffect(() => {
|
|
37831
|
+
if (!videoStreamsLoading) {
|
|
37832
|
+
setResolvedStreamWorkspaceKey(workspaceIdsKey);
|
|
37833
|
+
}
|
|
37834
|
+
}, [videoStreamsLoading, workspaceIdsKey]);
|
|
37829
37835
|
const videoConfig = useVideoConfig();
|
|
37830
37836
|
const dashboardConfig = useDashboardConfig();
|
|
37831
37837
|
const timezone = useAppTimezone();
|
|
@@ -37919,7 +37925,7 @@ var VideoGridView = React144__namespace.default.memo(({
|
|
|
37919
37925
|
return a.workspace_name.localeCompare(b.workspace_name);
|
|
37920
37926
|
});
|
|
37921
37927
|
}, [filteredWorkspaces]);
|
|
37922
|
-
const
|
|
37928
|
+
const streamsResolvedForWorkspaceSet = resolvedStreamWorkspaceKey === workspaceIdsKey;
|
|
37923
37929
|
const resolveWorkspaceDisplayName = React144.useCallback((workspace) => {
|
|
37924
37930
|
return workspace.displayName || displayNames[`${workspace.line_id}_${workspace.workspace_name}`] || workspace.workspace_name;
|
|
37925
37931
|
}, [displayNames]);
|
|
@@ -38111,7 +38117,7 @@ var VideoGridView = React144__namespace.default.memo(({
|
|
|
38111
38117
|
const r2Url = workspaceStream?.hls_url;
|
|
38112
38118
|
const fallbackUrl = getWorkspaceHlsUrl(workspace.workspace_name, workspace.line_id);
|
|
38113
38119
|
const hasR2Stream = Boolean(r2Url);
|
|
38114
|
-
const useFallback = r2FallbackWorkspaces.has(workspaceId) ||
|
|
38120
|
+
const useFallback = r2FallbackWorkspaces.has(workspaceId) || streamsResolvedForWorkspaceSet && !hasR2Stream;
|
|
38115
38121
|
const hlsUrl = useFallback ? fallbackUrl : r2Url ?? "";
|
|
38116
38122
|
const isR2Stream = !useFallback && hasR2Stream;
|
|
38117
38123
|
const canAttemptR2 = hasR2Stream && !r2FallbackWorkspaces.has(workspaceId);
|
|
@@ -38138,7 +38144,7 @@ var VideoGridView = React144__namespace.default.memo(({
|
|
|
38138
38144
|
lastSeenByWorkspaceId,
|
|
38139
38145
|
getWorkspaceHlsUrl,
|
|
38140
38146
|
r2FallbackWorkspaces,
|
|
38141
|
-
|
|
38147
|
+
streamsResolvedForWorkspaceSet,
|
|
38142
38148
|
failedStreams
|
|
38143
38149
|
]);
|
|
38144
38150
|
const croppedActiveCount = React144.useMemo(() => {
|
package/dist/index.mjs
CHANGED
|
@@ -37793,10 +37793,16 @@ var VideoGridView = React144__default.memo(({
|
|
|
37793
37793
|
const ids = workspaces.map((ws) => ws.workspace_uuid || ws.workspace_name);
|
|
37794
37794
|
return ids.sort().join(",");
|
|
37795
37795
|
}, [workspaces]);
|
|
37796
|
+
const [resolvedStreamWorkspaceKey, setResolvedStreamWorkspaceKey] = useState(() => videoStreamsLoading ? null : workspaceIdsKey);
|
|
37796
37797
|
useEffect(() => {
|
|
37797
37798
|
setFailedStreams(/* @__PURE__ */ new Set());
|
|
37798
37799
|
setR2FallbackWorkspaces(/* @__PURE__ */ new Set());
|
|
37799
37800
|
}, [workspaceIdsKey]);
|
|
37801
|
+
useEffect(() => {
|
|
37802
|
+
if (!videoStreamsLoading) {
|
|
37803
|
+
setResolvedStreamWorkspaceKey(workspaceIdsKey);
|
|
37804
|
+
}
|
|
37805
|
+
}, [videoStreamsLoading, workspaceIdsKey]);
|
|
37800
37806
|
const videoConfig = useVideoConfig();
|
|
37801
37807
|
const dashboardConfig = useDashboardConfig();
|
|
37802
37808
|
const timezone = useAppTimezone();
|
|
@@ -37890,7 +37896,7 @@ var VideoGridView = React144__default.memo(({
|
|
|
37890
37896
|
return a.workspace_name.localeCompare(b.workspace_name);
|
|
37891
37897
|
});
|
|
37892
37898
|
}, [filteredWorkspaces]);
|
|
37893
|
-
const
|
|
37899
|
+
const streamsResolvedForWorkspaceSet = resolvedStreamWorkspaceKey === workspaceIdsKey;
|
|
37894
37900
|
const resolveWorkspaceDisplayName = useCallback((workspace) => {
|
|
37895
37901
|
return workspace.displayName || displayNames[`${workspace.line_id}_${workspace.workspace_name}`] || workspace.workspace_name;
|
|
37896
37902
|
}, [displayNames]);
|
|
@@ -38082,7 +38088,7 @@ var VideoGridView = React144__default.memo(({
|
|
|
38082
38088
|
const r2Url = workspaceStream?.hls_url;
|
|
38083
38089
|
const fallbackUrl = getWorkspaceHlsUrl(workspace.workspace_name, workspace.line_id);
|
|
38084
38090
|
const hasR2Stream = Boolean(r2Url);
|
|
38085
|
-
const useFallback = r2FallbackWorkspaces.has(workspaceId) ||
|
|
38091
|
+
const useFallback = r2FallbackWorkspaces.has(workspaceId) || streamsResolvedForWorkspaceSet && !hasR2Stream;
|
|
38086
38092
|
const hlsUrl = useFallback ? fallbackUrl : r2Url ?? "";
|
|
38087
38093
|
const isR2Stream = !useFallback && hasR2Stream;
|
|
38088
38094
|
const canAttemptR2 = hasR2Stream && !r2FallbackWorkspaces.has(workspaceId);
|
|
@@ -38109,7 +38115,7 @@ var VideoGridView = React144__default.memo(({
|
|
|
38109
38115
|
lastSeenByWorkspaceId,
|
|
38110
38116
|
getWorkspaceHlsUrl,
|
|
38111
38117
|
r2FallbackWorkspaces,
|
|
38112
|
-
|
|
38118
|
+
streamsResolvedForWorkspaceSet,
|
|
38113
38119
|
failedStreams
|
|
38114
38120
|
]);
|
|
38115
38121
|
const croppedActiveCount = useMemo(() => {
|