@camstack/ui-library 1.2.198 → 1.2.199
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/generated/system-hooks.d.ts +74 -76
- package/dist/index.cjs +181 -175
- package/dist/index.js +146 -139
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7178,12 +7178,6 @@ var useDoorbellApplyDeviceSettingsPatch = trpc.doorbell.applyDeviceSettingsPatch
|
|
|
7178
7178
|
var useEnumSensorGetStatus = trpc.enumSensor.getStatus.useQuery;
|
|
7179
7179
|
/** Generated alias around `trpc.eventEmitter.getStatus.useQuery`. */
|
|
7180
7180
|
var useEventEmitterGetStatus = trpc.eventEmitter.getStatus.useQuery;
|
|
7181
|
-
/** Generated alias around `trpc.events.getEvents.useQuery`. */
|
|
7182
|
-
var useEventsGetEvents = trpc.events.getEvents.useQuery;
|
|
7183
|
-
/** Generated alias around `trpc.events.getEventThumbnail.useQuery`. */
|
|
7184
|
-
var useEventsGetEventThumbnail = trpc.events.getEventThumbnail.useQuery;
|
|
7185
|
-
/** Generated alias around `trpc.events.getEventClipUrl.useQuery`. */
|
|
7186
|
-
var useEventsGetEventClipUrl = trpc.events.getEventClipUrl.useQuery;
|
|
7187
7181
|
/** Generated alias around `trpc.faceGallery.listIdentities.useQuery`. */
|
|
7188
7182
|
var useFaceGalleryListIdentities = trpc.faceGallery.listIdentities.useQuery;
|
|
7189
7183
|
/** Generated alias around `trpc.faceGallery.createIdentity.useMutation`. */
|
|
@@ -8092,80 +8086,84 @@ var usePtzAutotrackGetSettings = trpc.ptzAutotrack.getSettings.useQuery;
|
|
|
8092
8086
|
var usePtzAutotrackSetSettings = trpc.ptzAutotrack.setSettings.useMutation;
|
|
8093
8087
|
/** Generated alias around `trpc.reboot.reboot.useMutation`. */
|
|
8094
8088
|
var useRebootReboot = trpc.reboot.reboot.useMutation;
|
|
8089
|
+
/** Generated alias around `trpc.recording.listSources.useQuery`. */
|
|
8090
|
+
var useRecordingListSources = trpc.recording.listSources.useQuery;
|
|
8095
8091
|
/** Generated alias around `trpc.recording.getAvailability.useQuery`. */
|
|
8096
8092
|
var useRecordingGetAvailability = trpc.recording.getAvailability.useQuery;
|
|
8097
|
-
/** Generated alias around `trpc.recording.getAvailabilityBatch.useQuery`. */
|
|
8098
|
-
var useRecordingGetAvailabilityBatch = trpc.recording.getAvailabilityBatch.useQuery;
|
|
8099
8093
|
/** Generated alias around `trpc.recording.getDaysWithRecordings.useQuery`. */
|
|
8100
8094
|
var useRecordingGetDaysWithRecordings = trpc.recording.getDaysWithRecordings.useQuery;
|
|
8101
|
-
/** Generated alias around `trpc.recording.
|
|
8102
|
-
var
|
|
8103
|
-
/** Generated alias around `trpc.recording.
|
|
8104
|
-
var
|
|
8105
|
-
/** Generated alias around `trpc.
|
|
8106
|
-
var
|
|
8107
|
-
/** Generated alias around `trpc.
|
|
8108
|
-
var
|
|
8109
|
-
/** Generated alias around `trpc.
|
|
8110
|
-
var
|
|
8111
|
-
/** Generated alias around `trpc.
|
|
8112
|
-
var
|
|
8113
|
-
/** Generated alias around `trpc.
|
|
8114
|
-
var
|
|
8115
|
-
/** Generated alias around `trpc.
|
|
8116
|
-
var
|
|
8117
|
-
/** Generated alias around `trpc.
|
|
8118
|
-
var
|
|
8119
|
-
/** Generated alias around `trpc.
|
|
8120
|
-
var
|
|
8121
|
-
/** Generated alias around `trpc.
|
|
8122
|
-
var
|
|
8123
|
-
/** Generated alias around `trpc.
|
|
8124
|
-
var
|
|
8125
|
-
/** Generated alias around `trpc.
|
|
8126
|
-
var
|
|
8127
|
-
/** Generated alias around `trpc.
|
|
8128
|
-
var
|
|
8129
|
-
/** Generated alias around `trpc.
|
|
8130
|
-
var
|
|
8131
|
-
/** Generated alias around `trpc.
|
|
8132
|
-
var
|
|
8133
|
-
/** Generated alias around `trpc.
|
|
8134
|
-
var
|
|
8135
|
-
/** Generated alias around `trpc.
|
|
8136
|
-
var
|
|
8137
|
-
/** Generated alias around `trpc.
|
|
8138
|
-
var
|
|
8139
|
-
/** Generated alias around `trpc.
|
|
8140
|
-
var
|
|
8141
|
-
/** Generated alias around `trpc.
|
|
8142
|
-
var
|
|
8143
|
-
/** Generated alias around `trpc.
|
|
8144
|
-
var
|
|
8145
|
-
/** Generated alias around `trpc.
|
|
8146
|
-
var
|
|
8147
|
-
/** Generated alias around `trpc.
|
|
8148
|
-
var
|
|
8149
|
-
/** Generated alias around `trpc.
|
|
8150
|
-
var
|
|
8151
|
-
/** Generated alias around `trpc.
|
|
8152
|
-
var
|
|
8153
|
-
/** Generated alias around `trpc.
|
|
8154
|
-
var
|
|
8155
|
-
/** Generated alias around `trpc.
|
|
8156
|
-
var
|
|
8157
|
-
/** Generated alias around `trpc.
|
|
8158
|
-
var
|
|
8159
|
-
/** Generated alias around `trpc.
|
|
8160
|
-
var
|
|
8161
|
-
/** Generated alias around `trpc.
|
|
8162
|
-
var
|
|
8163
|
-
/** Generated alias around `trpc.
|
|
8164
|
-
var
|
|
8165
|
-
/** Generated alias around `trpc.
|
|
8166
|
-
var
|
|
8167
|
-
/** Generated alias around `trpc.
|
|
8168
|
-
var
|
|
8095
|
+
/** Generated alias around `trpc.recording.getPlayback.useQuery`. */
|
|
8096
|
+
var useRecordingGetPlayback = trpc.recording.getPlayback.useQuery;
|
|
8097
|
+
/** Generated alias around `trpc.recording.getPlaybackOptions.useQuery`. */
|
|
8098
|
+
var useRecordingGetPlaybackOptions = trpc.recording.getPlaybackOptions.useQuery;
|
|
8099
|
+
/** Generated alias around `trpc.recordingArchive.getAvailabilityBatch.useQuery`. */
|
|
8100
|
+
var useRecordingArchiveGetAvailabilityBatch = trpc.recordingArchive.getAvailabilityBatch.useQuery;
|
|
8101
|
+
/** Generated alias around `trpc.recordingArchive.getDaysWithRecordingsBatch.useQuery`. */
|
|
8102
|
+
var useRecordingArchiveGetDaysWithRecordingsBatch = trpc.recordingArchive.getDaysWithRecordingsBatch.useQuery;
|
|
8103
|
+
/** Generated alias around `trpc.recordingArchive.getStorageUsage.useQuery`. */
|
|
8104
|
+
var useRecordingArchiveGetStorageUsage = trpc.recordingArchive.getStorageUsage.useQuery;
|
|
8105
|
+
/** Generated alias around `trpc.recordingArchive.getDeviceConfig.useQuery`. */
|
|
8106
|
+
var useRecordingArchiveGetDeviceConfig = trpc.recordingArchive.getDeviceConfig.useQuery;
|
|
8107
|
+
/** Generated alias around `trpc.recordingArchive.locateSegment.useQuery`. */
|
|
8108
|
+
var useRecordingArchiveLocateSegment = trpc.recordingArchive.locateSegment.useQuery;
|
|
8109
|
+
/** Generated alias around `trpc.recordingArchive.readSegmentBytes.useQuery`. */
|
|
8110
|
+
var useRecordingArchiveReadSegmentBytes = trpc.recordingArchive.readSegmentBytes.useQuery;
|
|
8111
|
+
/** Generated alias around `trpc.recordingArchive.readGopBytes.useQuery`. */
|
|
8112
|
+
var useRecordingArchiveReadGopBytes = trpc.recordingArchive.readGopBytes.useQuery;
|
|
8113
|
+
/** Generated alias around `trpc.recordingArchive.readWindowBytes.useQuery`. */
|
|
8114
|
+
var useRecordingArchiveReadWindowBytes = trpc.recordingArchive.readWindowBytes.useQuery;
|
|
8115
|
+
/** Generated alias around `trpc.recordingArchive.setDeviceConfig.useMutation`. */
|
|
8116
|
+
var useRecordingArchiveSetDeviceConfig = trpc.recordingArchive.setDeviceConfig.useMutation;
|
|
8117
|
+
/** Generated alias around `trpc.recordingArchive.rescanStorage.useMutation`. */
|
|
8118
|
+
var useRecordingArchiveRescanStorage = trpc.recordingArchive.rescanStorage.useMutation;
|
|
8119
|
+
/** Generated alias around `trpc.recordingArchive.pruneFootage.useMutation`. */
|
|
8120
|
+
var useRecordingArchivePruneFootage = trpc.recordingArchive.pruneFootage.useMutation;
|
|
8121
|
+
/** Generated alias around `trpc.recordingArchive.deleteFootprint.useMutation`. */
|
|
8122
|
+
var useRecordingArchiveDeleteFootprint = trpc.recordingArchive.deleteFootprint.useMutation;
|
|
8123
|
+
/** Generated alias around `trpc.recordingArchive.listOpsLog.useQuery`. */
|
|
8124
|
+
var useRecordingArchiveListOpsLog = trpc.recordingArchive.listOpsLog.useQuery;
|
|
8125
|
+
/** Generated alias around `trpc.recordingArchive.renderGif.useMutation`. */
|
|
8126
|
+
var useRecordingArchiveRenderGif = trpc.recordingArchive.renderGif.useMutation;
|
|
8127
|
+
/** Generated alias around `trpc.recordingArchive.renderClip.useMutation`. */
|
|
8128
|
+
var useRecordingArchiveRenderClip = trpc.recordingArchive.renderClip.useMutation;
|
|
8129
|
+
/** Generated alias around `trpc.recordingArchive.pauseForStorageMigration.useMutation`. */
|
|
8130
|
+
var useRecordingArchivePauseForStorageMigration = trpc.recordingArchive.pauseForStorageMigration.useMutation;
|
|
8131
|
+
/** Generated alias around `trpc.recordingArchive.resumeForStorageMigration.useMutation`. */
|
|
8132
|
+
var useRecordingArchiveResumeForStorageMigration = trpc.recordingArchive.resumeForStorageMigration.useMutation;
|
|
8133
|
+
/** Generated alias around `trpc.recordingArchive.refreshStorageLocationsForMigration.useMutation`. */
|
|
8134
|
+
var useRecordingArchiveRefreshStorageLocationsForMigration = trpc.recordingArchive.refreshStorageLocationsForMigration.useMutation;
|
|
8135
|
+
/** Generated alias around `trpc.recordingArchive.startStorageMigrationMove.useMutation`. */
|
|
8136
|
+
var useRecordingArchiveStartStorageMigrationMove = trpc.recordingArchive.startStorageMigrationMove.useMutation;
|
|
8137
|
+
/** Generated alias around `trpc.recordingArchive.getStorageMigrationMoveStatus.useQuery`. */
|
|
8138
|
+
var useRecordingArchiveGetStorageMigrationMoveStatus = trpc.recordingArchive.getStorageMigrationMoveStatus.useQuery;
|
|
8139
|
+
/** Generated alias around `trpc.recordingArchive.cancelStorageMigrationMove.useMutation`. */
|
|
8140
|
+
var useRecordingArchiveCancelStorageMigrationMove = trpc.recordingArchive.cancelStorageMigrationMove.useMutation;
|
|
8141
|
+
/** Generated alias around `trpc.recordingArchive.relocateFootage.useMutation`. */
|
|
8142
|
+
var useRecordingArchiveRelocateFootage = trpc.recordingArchive.relocateFootage.useMutation;
|
|
8143
|
+
/** Generated alias around `trpc.recordingArchive.listRelocateJobs.useQuery`. */
|
|
8144
|
+
var useRecordingArchiveListRelocateJobs = trpc.recordingArchive.listRelocateJobs.useQuery;
|
|
8145
|
+
/** Generated alias around `trpc.recordingArchive.getRelocateResidue.useQuery`. */
|
|
8146
|
+
var useRecordingArchiveGetRelocateResidue = trpc.recordingArchive.getRelocateResidue.useQuery;
|
|
8147
|
+
/** Generated alias around `trpc.recordingArchive.reconcileLedgerAgainstDisk.useMutation`. */
|
|
8148
|
+
var useRecordingArchiveReconcileLedgerAgainstDisk = trpc.recordingArchive.reconcileLedgerAgainstDisk.useMutation;
|
|
8149
|
+
/** Generated alias around `trpc.recordingArchive.cancelRelocateJob.useMutation`. */
|
|
8150
|
+
var useRecordingArchiveCancelRelocateJob = trpc.recordingArchive.cancelRelocateJob.useMutation;
|
|
8151
|
+
/** Generated alias around `trpc.recordingArchive.planStorageRebalance.useQuery`. */
|
|
8152
|
+
var useRecordingArchivePlanStorageRebalance = trpc.recordingArchive.planStorageRebalance.useQuery;
|
|
8153
|
+
/** Generated alias around `trpc.recordingArchive.startStorageRebalance.useMutation`. */
|
|
8154
|
+
var useRecordingArchiveStartStorageRebalance = trpc.recordingArchive.startStorageRebalance.useMutation;
|
|
8155
|
+
/** Generated alias around `trpc.recordingArchive.getPlacement.useQuery`. */
|
|
8156
|
+
var useRecordingArchiveGetPlacement = trpc.recordingArchive.getPlacement.useQuery;
|
|
8157
|
+
/** Generated alias around `trpc.recordingArchive.setDevicePlacement.useMutation`. */
|
|
8158
|
+
var useRecordingArchiveSetDevicePlacement = trpc.recordingArchive.setDevicePlacement.useMutation;
|
|
8159
|
+
/** Generated alias around `trpc.recordingArchive.getStatus.useQuery`. */
|
|
8160
|
+
var useRecordingArchiveGetStatus = trpc.recordingArchive.getStatus.useQuery;
|
|
8161
|
+
/** Generated alias around `trpc.recordingArchive.getDeviceSettingsContribution.useQuery`. */
|
|
8162
|
+
var useRecordingArchiveGetDeviceSettingsContribution = trpc.recordingArchive.getDeviceSettingsContribution.useQuery;
|
|
8163
|
+
/** Generated alias around `trpc.recordingArchive.getDeviceLiveContribution.useQuery`. */
|
|
8164
|
+
var useRecordingArchiveGetDeviceLiveContribution = trpc.recordingArchive.getDeviceLiveContribution.useQuery;
|
|
8165
|
+
/** Generated alias around `trpc.recordingArchive.applyDeviceSettingsPatch.useMutation`. */
|
|
8166
|
+
var useRecordingArchiveApplyDeviceSettingsPatch = trpc.recordingArchive.applyDeviceSettingsPatch.useMutation;
|
|
8169
8167
|
/** Generated alias around `trpc.recordingExport.createExport.useMutation`. */
|
|
8170
8168
|
var useRecordingExportCreateExport = trpc.recordingExport.createExport.useMutation;
|
|
8171
8169
|
/** Generated alias around `trpc.recordingExport.listExports.useQuery`. */
|
|
@@ -23007,55 +23005,6 @@ function useScrubController(sink, isPlayerLive = () => false) {
|
|
|
23007
23005
|
};
|
|
23008
23006
|
}
|
|
23009
23007
|
//#endregion
|
|
23010
|
-
//#region src/composites/cap-settings/recording-spans.ts
|
|
23011
|
-
/**
|
|
23012
|
-
* Merge availability ranges (across every profile) into the union of distinct
|
|
23013
|
-
* time windows, ascending by start. Overlapping or touching intervals coalesce;
|
|
23014
|
-
* zero/negative-length inputs are dropped. Newest-first ordering is the caller's
|
|
23015
|
-
* concern (it reverses for display).
|
|
23016
|
-
*/
|
|
23017
|
-
function mergeAvailabilitySpans(ranges) {
|
|
23018
|
-
const sorted = ranges.filter((r) => r.endMs > r.startMs).map((r) => ({
|
|
23019
|
-
startMs: r.startMs,
|
|
23020
|
-
endMs: r.endMs
|
|
23021
|
-
})).toSorted((a, b) => a.startMs - b.startMs);
|
|
23022
|
-
const out = [];
|
|
23023
|
-
for (const r of sorted) {
|
|
23024
|
-
const last = out[out.length - 1];
|
|
23025
|
-
if (last && r.startMs <= last.endMs) {
|
|
23026
|
-
if (r.endMs > last.endMs) out[out.length - 1] = {
|
|
23027
|
-
startMs: last.startMs,
|
|
23028
|
-
endMs: r.endMs
|
|
23029
|
-
};
|
|
23030
|
-
} else out.push(r);
|
|
23031
|
-
}
|
|
23032
|
-
return out;
|
|
23033
|
-
}
|
|
23034
|
-
/**
|
|
23035
|
-
* Pick the right unit for a byte count and render it with a sensible number of
|
|
23036
|
-
* significant digits (binary prefixes, matching recording sizes elsewhere).
|
|
23037
|
-
* KB and up render one decimal under 100, none above; bytes never get a decimal.
|
|
23038
|
-
*/
|
|
23039
|
-
function formatBytes(bytes) {
|
|
23040
|
-
if (!Number.isFinite(bytes) || bytes < 0) return "—";
|
|
23041
|
-
if (bytes < 1024) return `${Math.round(bytes)} B`;
|
|
23042
|
-
const units = [
|
|
23043
|
-
"KB",
|
|
23044
|
-
"MB",
|
|
23045
|
-
"GB",
|
|
23046
|
-
"TB",
|
|
23047
|
-
"PB"
|
|
23048
|
-
];
|
|
23049
|
-
let value = bytes / 1024;
|
|
23050
|
-
let unit = "KB";
|
|
23051
|
-
for (const u of units) {
|
|
23052
|
-
unit = u;
|
|
23053
|
-
if (value < 1024) break;
|
|
23054
|
-
value /= 1024;
|
|
23055
|
-
}
|
|
23056
|
-
return `${value >= 100 ? Math.round(value).toString() : value.toFixed(1)} ${unit}`;
|
|
23057
|
-
}
|
|
23058
|
-
//#endregion
|
|
23059
23008
|
//#region src/composites/cap-settings/CoverageTrack.tsx
|
|
23060
23009
|
function CoverageTrack({ windowFrom, windowTo, spans, playheadMs, onSeek, onScrubStart, onScrubMove, onScrubEnd }) {
|
|
23061
23010
|
const [hoverInfo, setHoverInfo] = (0, react$1.useState)(null);
|
|
@@ -23290,6 +23239,55 @@ function EventBucketStrip({ clips, loading, busyKey, onPlay, enabledKinds, onTog
|
|
|
23290
23239
|
});
|
|
23291
23240
|
}
|
|
23292
23241
|
//#endregion
|
|
23242
|
+
//#region src/composites/cap-settings/recording-spans.ts
|
|
23243
|
+
/**
|
|
23244
|
+
* Merge availability ranges (across every profile) into the union of distinct
|
|
23245
|
+
* time windows, ascending by start. Overlapping or touching intervals coalesce;
|
|
23246
|
+
* zero/negative-length inputs are dropped. Newest-first ordering is the caller's
|
|
23247
|
+
* concern (it reverses for display).
|
|
23248
|
+
*/
|
|
23249
|
+
function mergeAvailabilitySpans(ranges) {
|
|
23250
|
+
const sorted = ranges.filter((r) => r.endMs > r.startMs).map((r) => ({
|
|
23251
|
+
startMs: r.startMs,
|
|
23252
|
+
endMs: r.endMs
|
|
23253
|
+
})).toSorted((a, b) => a.startMs - b.startMs);
|
|
23254
|
+
const out = [];
|
|
23255
|
+
for (const r of sorted) {
|
|
23256
|
+
const last = out[out.length - 1];
|
|
23257
|
+
if (last && r.startMs <= last.endMs) {
|
|
23258
|
+
if (r.endMs > last.endMs) out[out.length - 1] = {
|
|
23259
|
+
startMs: last.startMs,
|
|
23260
|
+
endMs: r.endMs
|
|
23261
|
+
};
|
|
23262
|
+
} else out.push(r);
|
|
23263
|
+
}
|
|
23264
|
+
return out;
|
|
23265
|
+
}
|
|
23266
|
+
/**
|
|
23267
|
+
* Pick the right unit for a byte count and render it with a sensible number of
|
|
23268
|
+
* significant digits (binary prefixes, matching recording sizes elsewhere).
|
|
23269
|
+
* KB and up render one decimal under 100, none above; bytes never get a decimal.
|
|
23270
|
+
*/
|
|
23271
|
+
function formatBytes(bytes) {
|
|
23272
|
+
if (!Number.isFinite(bytes) || bytes < 0) return "—";
|
|
23273
|
+
if (bytes < 1024) return `${Math.round(bytes)} B`;
|
|
23274
|
+
const units = [
|
|
23275
|
+
"KB",
|
|
23276
|
+
"MB",
|
|
23277
|
+
"GB",
|
|
23278
|
+
"TB",
|
|
23279
|
+
"PB"
|
|
23280
|
+
];
|
|
23281
|
+
let value = bytes / 1024;
|
|
23282
|
+
let unit = "KB";
|
|
23283
|
+
for (const u of units) {
|
|
23284
|
+
unit = u;
|
|
23285
|
+
if (value < 1024) break;
|
|
23286
|
+
value /= 1024;
|
|
23287
|
+
}
|
|
23288
|
+
return `${value >= 100 ? Math.round(value).toString() : value.toFixed(1)} ${unit}`;
|
|
23289
|
+
}
|
|
23290
|
+
//#endregion
|
|
23293
23291
|
//#region src/composites/cap-settings/RecordingTimeline.tsx
|
|
23294
23292
|
var ALL_KINDS = [
|
|
23295
23293
|
"motion",
|
|
@@ -23401,6 +23399,7 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23401
23399
|
const bucketMs = bucketMsForSpan(view.toMs - view.fromMs);
|
|
23402
23400
|
const availabilityQuery = useRecordingGetAvailability({
|
|
23403
23401
|
deviceId,
|
|
23402
|
+
provider: _camstack_types.RECORDING_SOURCE_CAMSTACK_ADDON,
|
|
23404
23403
|
fromMs: view.fromMs,
|
|
23405
23404
|
toMs: view.toMs
|
|
23406
23405
|
});
|
|
@@ -23410,7 +23409,8 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23410
23409
|
until: view.toMs,
|
|
23411
23410
|
bucketMs
|
|
23412
23411
|
});
|
|
23413
|
-
const
|
|
23412
|
+
const availabilityUnreadable = availabilityQuery.data?.read === "unreadable";
|
|
23413
|
+
const ranges = availabilityQuery.data?.read === "read" ? availabilityQuery.data.ranges : EMPTY_RANGES;
|
|
23414
23414
|
const spans = (0, react$1.useMemo)(() => mergeAvailabilitySpans(ranges), [ranges]);
|
|
23415
23415
|
const buckets = (0, react$1.useMemo)(() => densityRowsToBuckets(eventDensityQuery.data ?? [], view.fromMs, bucketMs), [
|
|
23416
23416
|
eventDensityQuery.data,
|
|
@@ -23490,18 +23490,19 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23490
23490
|
setBusyKey(key);
|
|
23491
23491
|
setPlaybackError(null);
|
|
23492
23492
|
try {
|
|
23493
|
-
const
|
|
23493
|
+
const playback = await system.trpcClient.recording.getPlayback.query({
|
|
23494
23494
|
deviceId,
|
|
23495
|
+
provider: _camstack_types.RECORDING_SOURCE_CAMSTACK_ADDON,
|
|
23495
23496
|
fromMs,
|
|
23496
23497
|
toMs
|
|
23497
23498
|
});
|
|
23498
|
-
if (manifest
|
|
23499
|
+
if (playback.kind === "hls" && playback.manifest.playbackUrl) {
|
|
23499
23500
|
setPlayheadMs(headMs);
|
|
23500
23501
|
vod.play({
|
|
23501
|
-
url: manifest.playbackUrl,
|
|
23502
|
+
url: playback.manifest.playbackUrl,
|
|
23502
23503
|
label
|
|
23503
23504
|
});
|
|
23504
|
-
} else setPlaybackError("No playable footage for this selection.");
|
|
23505
|
+
} else setPlaybackError(playback.kind === "none" ? `No playable footage for this selection — ${playback.reason}` : "No playable footage for this selection.");
|
|
23505
23506
|
} catch {
|
|
23506
23507
|
setPlaybackError("Could not load this recording.");
|
|
23507
23508
|
} finally {
|
|
@@ -23567,6 +23568,10 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23567
23568
|
variant: "warning",
|
|
23568
23569
|
message: "Recorder unavailable — the recording service may not be running for this node."
|
|
23569
23570
|
}) : null,
|
|
23571
|
+
availabilityUnreadable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorBox, {
|
|
23572
|
+
variant: "warning",
|
|
23573
|
+
message: "CamStack could not be asked about this camera's recordings — this bar shows nothing, which is not the same as no footage."
|
|
23574
|
+
}) : null,
|
|
23570
23575
|
playbackError ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorBox, {
|
|
23571
23576
|
variant: "warning",
|
|
23572
23577
|
message: playbackError
|
|
@@ -23687,13 +23692,13 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23687
23692
|
var DAY_MS$1 = 1440 * 60 * 1e3;
|
|
23688
23693
|
function RecordingPanel({ deviceId }) {
|
|
23689
23694
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
23690
|
-
const statusQuery =
|
|
23691
|
-
const configQuery =
|
|
23695
|
+
const statusQuery = useRecordingArchiveGetStatus({ deviceId });
|
|
23696
|
+
const configQuery = useRecordingArchiveGetDeviceConfig({ deviceId });
|
|
23692
23697
|
const cameraLocation = useDeviceManagerGetDevice({ deviceId }).data?.location ?? null;
|
|
23693
23698
|
const bindingsQuery = useDeviceManagerGetBindings({ deviceId });
|
|
23694
23699
|
const deviceSignal = bindingsQuery.status === "pending" ? "pending" : bindingsQuery.status === "error" ? "unknown" : bindingsQuery.data.entries.some((e) => e.capName === "recording-signal") ? "present" : "absent";
|
|
23695
|
-
const setConfig =
|
|
23696
|
-
const rescanStorage =
|
|
23700
|
+
const setConfig = useRecordingArchiveSetDeviceConfig();
|
|
23701
|
+
const rescanStorage = useRecordingArchiveRescanStorage();
|
|
23697
23702
|
const { data: profileSlots } = useStreamBrokerListAllProfileSlots(void 0, { staleTime: 3e4 });
|
|
23698
23703
|
const availableProfiles = (0, react$1.useMemo)(() => (0, _camstack_types.selectAssignedProfileSlots)(profileSlots ?? [], deviceId).map((s) => s.profile), [profileSlots, deviceId]);
|
|
23699
23704
|
const saveConfig = (config) => {
|
|
@@ -23717,6 +23722,7 @@ function RecordingPanel({ deviceId }) {
|
|
|
23717
23722
|
const toMs = (0, react$1.useMemo)(() => Date.now(), []);
|
|
23718
23723
|
const availabilityQuery = useRecordingGetAvailability({
|
|
23719
23724
|
deviceId,
|
|
23725
|
+
provider: _camstack_types.RECORDING_SOURCE_CAMSTACK_ADDON,
|
|
23720
23726
|
fromMs: toMs - DAY_MS$1,
|
|
23721
23727
|
toMs
|
|
23722
23728
|
});
|
|
@@ -23724,7 +23730,8 @@ function RecordingPanel({ deviceId }) {
|
|
|
23724
23730
|
const status = parsedStatus?.success ? parsedStatus.data : null;
|
|
23725
23731
|
const parsedConfig = configQuery.data ? _camstack_types.RecordingConfigSchema.safeParse(configQuery.data) : null;
|
|
23726
23732
|
const resolvedConfig = parsedConfig?.success ? parsedConfig.data : null;
|
|
23727
|
-
const
|
|
23733
|
+
const availabilityUnreadable = availabilityQuery.data?.read === "unreadable";
|
|
23734
|
+
const ranges = availabilityQuery.data?.read === "read" ? availabilityQuery.data.ranges : [];
|
|
23728
23735
|
const recordedMs = ranges.reduce((acc, r) => acc + Math.max(0, r.endMs - r.startMs), 0);
|
|
23729
23736
|
const isRecording = status?.enabled === true && status.activeMode === "continuous";
|
|
23730
23737
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -23783,8 +23790,8 @@ function RecordingPanel({ deviceId }) {
|
|
|
23783
23790
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(WidgetMetricCard, {
|
|
23784
23791
|
label: "Recorded (24h)",
|
|
23785
23792
|
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Clock, { className: "h-3.5 w-3.5" }),
|
|
23786
|
-
footer: `${ranges.length} segment range${ranges.length === 1 ? "" : "s"}`,
|
|
23787
|
-
children: availabilityQuery.isLoading ? "…" : formatDurationMs(recordedMs)
|
|
23793
|
+
footer: availabilityUnreadable ? "nobody could look" : `${ranges.length} segment range${ranges.length === 1 ? "" : "s"}`,
|
|
23794
|
+
children: availabilityQuery.isLoading ? "…" : availabilityUnreadable ? "—" : formatDurationMs(recordedMs)
|
|
23788
23795
|
})
|
|
23789
23796
|
]
|
|
23790
23797
|
}),
|
|
@@ -56457,9 +56464,6 @@ exports.useEventEmitterGetStatus = useEventEmitterGetStatus;
|
|
|
56457
56464
|
exports.useEventInvalidation = useEventInvalidation;
|
|
56458
56465
|
exports.useEventStreamLatest = useEventStreamLatest;
|
|
56459
56466
|
exports.useEventStreamMap = useEventStreamMap;
|
|
56460
|
-
exports.useEventsGetEventClipUrl = useEventsGetEventClipUrl;
|
|
56461
|
-
exports.useEventsGetEventThumbnail = useEventsGetEventThumbnail;
|
|
56462
|
-
exports.useEventsGetEvents = useEventsGetEvents;
|
|
56463
56467
|
exports.useFaceGalleryAssignFace = useFaceGalleryAssignFace;
|
|
56464
56468
|
exports.useFaceGalleryAssignFaces = useFaceGalleryAssignFaces;
|
|
56465
56469
|
exports.useFaceGalleryAuditIdentitySamples = useFaceGalleryAuditIdentitySamples;
|
|
@@ -56929,10 +56933,40 @@ exports.usePtzSetHomeReturn = usePtzSetHomeReturn;
|
|
|
56929
56933
|
exports.usePtzStop = usePtzStop;
|
|
56930
56934
|
exports.useRebootReboot = useRebootReboot;
|
|
56931
56935
|
exports.useRecordedPlayback = useRecordedPlayback;
|
|
56932
|
-
exports.
|
|
56933
|
-
exports.
|
|
56934
|
-
exports.
|
|
56935
|
-
exports.
|
|
56936
|
+
exports.useRecordingArchiveApplyDeviceSettingsPatch = useRecordingArchiveApplyDeviceSettingsPatch;
|
|
56937
|
+
exports.useRecordingArchiveCancelRelocateJob = useRecordingArchiveCancelRelocateJob;
|
|
56938
|
+
exports.useRecordingArchiveCancelStorageMigrationMove = useRecordingArchiveCancelStorageMigrationMove;
|
|
56939
|
+
exports.useRecordingArchiveDeleteFootprint = useRecordingArchiveDeleteFootprint;
|
|
56940
|
+
exports.useRecordingArchiveGetAvailabilityBatch = useRecordingArchiveGetAvailabilityBatch;
|
|
56941
|
+
exports.useRecordingArchiveGetDaysWithRecordingsBatch = useRecordingArchiveGetDaysWithRecordingsBatch;
|
|
56942
|
+
exports.useRecordingArchiveGetDeviceConfig = useRecordingArchiveGetDeviceConfig;
|
|
56943
|
+
exports.useRecordingArchiveGetDeviceLiveContribution = useRecordingArchiveGetDeviceLiveContribution;
|
|
56944
|
+
exports.useRecordingArchiveGetDeviceSettingsContribution = useRecordingArchiveGetDeviceSettingsContribution;
|
|
56945
|
+
exports.useRecordingArchiveGetPlacement = useRecordingArchiveGetPlacement;
|
|
56946
|
+
exports.useRecordingArchiveGetRelocateResidue = useRecordingArchiveGetRelocateResidue;
|
|
56947
|
+
exports.useRecordingArchiveGetStatus = useRecordingArchiveGetStatus;
|
|
56948
|
+
exports.useRecordingArchiveGetStorageMigrationMoveStatus = useRecordingArchiveGetStorageMigrationMoveStatus;
|
|
56949
|
+
exports.useRecordingArchiveGetStorageUsage = useRecordingArchiveGetStorageUsage;
|
|
56950
|
+
exports.useRecordingArchiveListOpsLog = useRecordingArchiveListOpsLog;
|
|
56951
|
+
exports.useRecordingArchiveListRelocateJobs = useRecordingArchiveListRelocateJobs;
|
|
56952
|
+
exports.useRecordingArchiveLocateSegment = useRecordingArchiveLocateSegment;
|
|
56953
|
+
exports.useRecordingArchivePauseForStorageMigration = useRecordingArchivePauseForStorageMigration;
|
|
56954
|
+
exports.useRecordingArchivePlanStorageRebalance = useRecordingArchivePlanStorageRebalance;
|
|
56955
|
+
exports.useRecordingArchivePruneFootage = useRecordingArchivePruneFootage;
|
|
56956
|
+
exports.useRecordingArchiveReadGopBytes = useRecordingArchiveReadGopBytes;
|
|
56957
|
+
exports.useRecordingArchiveReadSegmentBytes = useRecordingArchiveReadSegmentBytes;
|
|
56958
|
+
exports.useRecordingArchiveReadWindowBytes = useRecordingArchiveReadWindowBytes;
|
|
56959
|
+
exports.useRecordingArchiveReconcileLedgerAgainstDisk = useRecordingArchiveReconcileLedgerAgainstDisk;
|
|
56960
|
+
exports.useRecordingArchiveRefreshStorageLocationsForMigration = useRecordingArchiveRefreshStorageLocationsForMigration;
|
|
56961
|
+
exports.useRecordingArchiveRelocateFootage = useRecordingArchiveRelocateFootage;
|
|
56962
|
+
exports.useRecordingArchiveRenderClip = useRecordingArchiveRenderClip;
|
|
56963
|
+
exports.useRecordingArchiveRenderGif = useRecordingArchiveRenderGif;
|
|
56964
|
+
exports.useRecordingArchiveRescanStorage = useRecordingArchiveRescanStorage;
|
|
56965
|
+
exports.useRecordingArchiveResumeForStorageMigration = useRecordingArchiveResumeForStorageMigration;
|
|
56966
|
+
exports.useRecordingArchiveSetDeviceConfig = useRecordingArchiveSetDeviceConfig;
|
|
56967
|
+
exports.useRecordingArchiveSetDevicePlacement = useRecordingArchiveSetDevicePlacement;
|
|
56968
|
+
exports.useRecordingArchiveStartStorageMigrationMove = useRecordingArchiveStartStorageMigrationMove;
|
|
56969
|
+
exports.useRecordingArchiveStartStorageRebalance = useRecordingArchiveStartStorageRebalance;
|
|
56936
56970
|
exports.useRecordingExportCancelExport = useRecordingExportCancelExport;
|
|
56937
56971
|
exports.useRecordingExportCreateExport = useRecordingExportCreateExport;
|
|
56938
56972
|
exports.useRecordingExportDeleteExport = useRecordingExportDeleteExport;
|
|
@@ -56941,42 +56975,14 @@ exports.useRecordingExportGetExport = useRecordingExportGetExport;
|
|
|
56941
56975
|
exports.useRecordingExportListExports = useRecordingExportListExports;
|
|
56942
56976
|
exports.useRecordingExportReadExportBytes = useRecordingExportReadExportBytes;
|
|
56943
56977
|
exports.useRecordingGetAvailability = useRecordingGetAvailability;
|
|
56944
|
-
exports.useRecordingGetAvailabilityBatch = useRecordingGetAvailabilityBatch;
|
|
56945
56978
|
exports.useRecordingGetDaysWithRecordings = useRecordingGetDaysWithRecordings;
|
|
56946
|
-
exports.
|
|
56947
|
-
exports.
|
|
56948
|
-
exports.
|
|
56949
|
-
exports.useRecordingGetDeviceSettingsContribution = useRecordingGetDeviceSettingsContribution;
|
|
56950
|
-
exports.useRecordingGetPlacement = useRecordingGetPlacement;
|
|
56951
|
-
exports.useRecordingGetPlaybackManifest = useRecordingGetPlaybackManifest;
|
|
56952
|
-
exports.useRecordingGetRelocateResidue = useRecordingGetRelocateResidue;
|
|
56953
|
-
exports.useRecordingGetStatus = useRecordingGetStatus;
|
|
56954
|
-
exports.useRecordingGetStorageMigrationMoveStatus = useRecordingGetStorageMigrationMoveStatus;
|
|
56955
|
-
exports.useRecordingGetStorageUsage = useRecordingGetStorageUsage;
|
|
56956
|
-
exports.useRecordingListOpsLog = useRecordingListOpsLog;
|
|
56957
|
-
exports.useRecordingListRelocateJobs = useRecordingListRelocateJobs;
|
|
56958
|
-
exports.useRecordingLocateSegment = useRecordingLocateSegment;
|
|
56979
|
+
exports.useRecordingGetPlayback = useRecordingGetPlayback;
|
|
56980
|
+
exports.useRecordingGetPlaybackOptions = useRecordingGetPlaybackOptions;
|
|
56981
|
+
exports.useRecordingListSources = useRecordingListSources;
|
|
56959
56982
|
exports.useRecordingOnboardGetOptions = useRecordingOnboardGetOptions;
|
|
56960
56983
|
exports.useRecordingOnboardGetStatus = useRecordingOnboardGetStatus;
|
|
56961
56984
|
exports.useRecordingOnboardSetSettings = useRecordingOnboardSetSettings;
|
|
56962
|
-
exports.useRecordingPauseForStorageMigration = useRecordingPauseForStorageMigration;
|
|
56963
|
-
exports.useRecordingPlanStorageRebalance = useRecordingPlanStorageRebalance;
|
|
56964
|
-
exports.useRecordingPruneFootage = useRecordingPruneFootage;
|
|
56965
|
-
exports.useRecordingReadGopBytes = useRecordingReadGopBytes;
|
|
56966
|
-
exports.useRecordingReadSegmentBytes = useRecordingReadSegmentBytes;
|
|
56967
|
-
exports.useRecordingReadWindowBytes = useRecordingReadWindowBytes;
|
|
56968
|
-
exports.useRecordingReconcileLedgerAgainstDisk = useRecordingReconcileLedgerAgainstDisk;
|
|
56969
|
-
exports.useRecordingRefreshStorageLocationsForMigration = useRecordingRefreshStorageLocationsForMigration;
|
|
56970
|
-
exports.useRecordingRelocateFootage = useRecordingRelocateFootage;
|
|
56971
|
-
exports.useRecordingRenderClip = useRecordingRenderClip;
|
|
56972
|
-
exports.useRecordingRenderGif = useRecordingRenderGif;
|
|
56973
|
-
exports.useRecordingRescanStorage = useRecordingRescanStorage;
|
|
56974
|
-
exports.useRecordingResumeForStorageMigration = useRecordingResumeForStorageMigration;
|
|
56975
|
-
exports.useRecordingSetDeviceConfig = useRecordingSetDeviceConfig;
|
|
56976
|
-
exports.useRecordingSetDevicePlacement = useRecordingSetDevicePlacement;
|
|
56977
56985
|
exports.useRecordingSignalGetStatus = useRecordingSignalGetStatus;
|
|
56978
|
-
exports.useRecordingStartStorageMigrationMove = useRecordingStartStorageMigrationMove;
|
|
56979
|
-
exports.useRecordingStartStorageRebalance = useRecordingStartStorageRebalance;
|
|
56980
56986
|
exports.useRemoteComponent = useRemoteComponent;
|
|
56981
56987
|
exports.useRoleDisplayDefaults = useRoleDisplayDefaults;
|
|
56982
56988
|
exports.useSceneMonitorCaptureReference = useSceneMonitorCaptureReference;
|