@camstack/ui-library 1.2.197 → 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 +78 -76
- package/dist/index.cjs +187 -175
- package/dist/index.js +150 -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`. */
|
|
@@ -8592,8 +8590,12 @@ var useVideoclipsListSources = trpc.videoclips.listSources.useQuery;
|
|
|
8592
8590
|
var useVideoclipsGetClipPlayback = trpc.videoclips.getClipPlayback.useQuery;
|
|
8593
8591
|
/** Generated alias around `trpc.videoclips.readClipBytes.useQuery`. */
|
|
8594
8592
|
var useVideoclipsReadClipBytes = trpc.videoclips.readClipBytes.useQuery;
|
|
8593
|
+
/** Generated alias around `trpc.videoclips.offerClipBytes.useQuery`. */
|
|
8594
|
+
var useVideoclipsOfferClipBytes = trpc.videoclips.offerClipBytes.useQuery;
|
|
8595
8595
|
/** Generated alias around `trpc.videoclips.dialClipStream.useQuery`. */
|
|
8596
8596
|
var useVideoclipsDialClipStream = trpc.videoclips.dialClipStream.useQuery;
|
|
8597
|
+
/** Generated alias around `trpc.videoclips.getPlaybackOptions.useQuery`. */
|
|
8598
|
+
var useVideoclipsGetPlaybackOptions = trpc.videoclips.getPlaybackOptions.useQuery;
|
|
8597
8599
|
/** Generated alias around `trpc.waterHeater.setTargetTemp.useMutation`. */
|
|
8598
8600
|
var useWaterHeaterSetTargetTemp = trpc.waterHeater.setTargetTemp.useMutation;
|
|
8599
8601
|
/** Generated alias around `trpc.waterHeater.setOperationMode.useMutation`. */
|
|
@@ -23003,55 +23005,6 @@ function useScrubController(sink, isPlayerLive = () => false) {
|
|
|
23003
23005
|
};
|
|
23004
23006
|
}
|
|
23005
23007
|
//#endregion
|
|
23006
|
-
//#region src/composites/cap-settings/recording-spans.ts
|
|
23007
|
-
/**
|
|
23008
|
-
* Merge availability ranges (across every profile) into the union of distinct
|
|
23009
|
-
* time windows, ascending by start. Overlapping or touching intervals coalesce;
|
|
23010
|
-
* zero/negative-length inputs are dropped. Newest-first ordering is the caller's
|
|
23011
|
-
* concern (it reverses for display).
|
|
23012
|
-
*/
|
|
23013
|
-
function mergeAvailabilitySpans(ranges) {
|
|
23014
|
-
const sorted = ranges.filter((r) => r.endMs > r.startMs).map((r) => ({
|
|
23015
|
-
startMs: r.startMs,
|
|
23016
|
-
endMs: r.endMs
|
|
23017
|
-
})).toSorted((a, b) => a.startMs - b.startMs);
|
|
23018
|
-
const out = [];
|
|
23019
|
-
for (const r of sorted) {
|
|
23020
|
-
const last = out[out.length - 1];
|
|
23021
|
-
if (last && r.startMs <= last.endMs) {
|
|
23022
|
-
if (r.endMs > last.endMs) out[out.length - 1] = {
|
|
23023
|
-
startMs: last.startMs,
|
|
23024
|
-
endMs: r.endMs
|
|
23025
|
-
};
|
|
23026
|
-
} else out.push(r);
|
|
23027
|
-
}
|
|
23028
|
-
return out;
|
|
23029
|
-
}
|
|
23030
|
-
/**
|
|
23031
|
-
* Pick the right unit for a byte count and render it with a sensible number of
|
|
23032
|
-
* significant digits (binary prefixes, matching recording sizes elsewhere).
|
|
23033
|
-
* KB and up render one decimal under 100, none above; bytes never get a decimal.
|
|
23034
|
-
*/
|
|
23035
|
-
function formatBytes(bytes) {
|
|
23036
|
-
if (!Number.isFinite(bytes) || bytes < 0) return "—";
|
|
23037
|
-
if (bytes < 1024) return `${Math.round(bytes)} B`;
|
|
23038
|
-
const units = [
|
|
23039
|
-
"KB",
|
|
23040
|
-
"MB",
|
|
23041
|
-
"GB",
|
|
23042
|
-
"TB",
|
|
23043
|
-
"PB"
|
|
23044
|
-
];
|
|
23045
|
-
let value = bytes / 1024;
|
|
23046
|
-
let unit = "KB";
|
|
23047
|
-
for (const u of units) {
|
|
23048
|
-
unit = u;
|
|
23049
|
-
if (value < 1024) break;
|
|
23050
|
-
value /= 1024;
|
|
23051
|
-
}
|
|
23052
|
-
return `${value >= 100 ? Math.round(value).toString() : value.toFixed(1)} ${unit}`;
|
|
23053
|
-
}
|
|
23054
|
-
//#endregion
|
|
23055
23008
|
//#region src/composites/cap-settings/CoverageTrack.tsx
|
|
23056
23009
|
function CoverageTrack({ windowFrom, windowTo, spans, playheadMs, onSeek, onScrubStart, onScrubMove, onScrubEnd }) {
|
|
23057
23010
|
const [hoverInfo, setHoverInfo] = (0, react$1.useState)(null);
|
|
@@ -23286,6 +23239,55 @@ function EventBucketStrip({ clips, loading, busyKey, onPlay, enabledKinds, onTog
|
|
|
23286
23239
|
});
|
|
23287
23240
|
}
|
|
23288
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
|
|
23289
23291
|
//#region src/composites/cap-settings/RecordingTimeline.tsx
|
|
23290
23292
|
var ALL_KINDS = [
|
|
23291
23293
|
"motion",
|
|
@@ -23397,6 +23399,7 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23397
23399
|
const bucketMs = bucketMsForSpan(view.toMs - view.fromMs);
|
|
23398
23400
|
const availabilityQuery = useRecordingGetAvailability({
|
|
23399
23401
|
deviceId,
|
|
23402
|
+
provider: _camstack_types.RECORDING_SOURCE_CAMSTACK_ADDON,
|
|
23400
23403
|
fromMs: view.fromMs,
|
|
23401
23404
|
toMs: view.toMs
|
|
23402
23405
|
});
|
|
@@ -23406,7 +23409,8 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23406
23409
|
until: view.toMs,
|
|
23407
23410
|
bucketMs
|
|
23408
23411
|
});
|
|
23409
|
-
const
|
|
23412
|
+
const availabilityUnreadable = availabilityQuery.data?.read === "unreadable";
|
|
23413
|
+
const ranges = availabilityQuery.data?.read === "read" ? availabilityQuery.data.ranges : EMPTY_RANGES;
|
|
23410
23414
|
const spans = (0, react$1.useMemo)(() => mergeAvailabilitySpans(ranges), [ranges]);
|
|
23411
23415
|
const buckets = (0, react$1.useMemo)(() => densityRowsToBuckets(eventDensityQuery.data ?? [], view.fromMs, bucketMs), [
|
|
23412
23416
|
eventDensityQuery.data,
|
|
@@ -23486,18 +23490,19 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23486
23490
|
setBusyKey(key);
|
|
23487
23491
|
setPlaybackError(null);
|
|
23488
23492
|
try {
|
|
23489
|
-
const
|
|
23493
|
+
const playback = await system.trpcClient.recording.getPlayback.query({
|
|
23490
23494
|
deviceId,
|
|
23495
|
+
provider: _camstack_types.RECORDING_SOURCE_CAMSTACK_ADDON,
|
|
23491
23496
|
fromMs,
|
|
23492
23497
|
toMs
|
|
23493
23498
|
});
|
|
23494
|
-
if (manifest
|
|
23499
|
+
if (playback.kind === "hls" && playback.manifest.playbackUrl) {
|
|
23495
23500
|
setPlayheadMs(headMs);
|
|
23496
23501
|
vod.play({
|
|
23497
|
-
url: manifest.playbackUrl,
|
|
23502
|
+
url: playback.manifest.playbackUrl,
|
|
23498
23503
|
label
|
|
23499
23504
|
});
|
|
23500
|
-
} 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.");
|
|
23501
23506
|
} catch {
|
|
23502
23507
|
setPlaybackError("Could not load this recording.");
|
|
23503
23508
|
} finally {
|
|
@@ -23563,6 +23568,10 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23563
23568
|
variant: "warning",
|
|
23564
23569
|
message: "Recorder unavailable — the recording service may not be running for this node."
|
|
23565
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,
|
|
23566
23575
|
playbackError ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorBox, {
|
|
23567
23576
|
variant: "warning",
|
|
23568
23577
|
message: playbackError
|
|
@@ -23683,13 +23692,13 @@ function RecordingTimeline({ deviceId }) {
|
|
|
23683
23692
|
var DAY_MS$1 = 1440 * 60 * 1e3;
|
|
23684
23693
|
function RecordingPanel({ deviceId }) {
|
|
23685
23694
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
23686
|
-
const statusQuery =
|
|
23687
|
-
const configQuery =
|
|
23695
|
+
const statusQuery = useRecordingArchiveGetStatus({ deviceId });
|
|
23696
|
+
const configQuery = useRecordingArchiveGetDeviceConfig({ deviceId });
|
|
23688
23697
|
const cameraLocation = useDeviceManagerGetDevice({ deviceId }).data?.location ?? null;
|
|
23689
23698
|
const bindingsQuery = useDeviceManagerGetBindings({ deviceId });
|
|
23690
23699
|
const deviceSignal = bindingsQuery.status === "pending" ? "pending" : bindingsQuery.status === "error" ? "unknown" : bindingsQuery.data.entries.some((e) => e.capName === "recording-signal") ? "present" : "absent";
|
|
23691
|
-
const setConfig =
|
|
23692
|
-
const rescanStorage =
|
|
23700
|
+
const setConfig = useRecordingArchiveSetDeviceConfig();
|
|
23701
|
+
const rescanStorage = useRecordingArchiveRescanStorage();
|
|
23693
23702
|
const { data: profileSlots } = useStreamBrokerListAllProfileSlots(void 0, { staleTime: 3e4 });
|
|
23694
23703
|
const availableProfiles = (0, react$1.useMemo)(() => (0, _camstack_types.selectAssignedProfileSlots)(profileSlots ?? [], deviceId).map((s) => s.profile), [profileSlots, deviceId]);
|
|
23695
23704
|
const saveConfig = (config) => {
|
|
@@ -23713,6 +23722,7 @@ function RecordingPanel({ deviceId }) {
|
|
|
23713
23722
|
const toMs = (0, react$1.useMemo)(() => Date.now(), []);
|
|
23714
23723
|
const availabilityQuery = useRecordingGetAvailability({
|
|
23715
23724
|
deviceId,
|
|
23725
|
+
provider: _camstack_types.RECORDING_SOURCE_CAMSTACK_ADDON,
|
|
23716
23726
|
fromMs: toMs - DAY_MS$1,
|
|
23717
23727
|
toMs
|
|
23718
23728
|
});
|
|
@@ -23720,7 +23730,8 @@ function RecordingPanel({ deviceId }) {
|
|
|
23720
23730
|
const status = parsedStatus?.success ? parsedStatus.data : null;
|
|
23721
23731
|
const parsedConfig = configQuery.data ? _camstack_types.RecordingConfigSchema.safeParse(configQuery.data) : null;
|
|
23722
23732
|
const resolvedConfig = parsedConfig?.success ? parsedConfig.data : null;
|
|
23723
|
-
const
|
|
23733
|
+
const availabilityUnreadable = availabilityQuery.data?.read === "unreadable";
|
|
23734
|
+
const ranges = availabilityQuery.data?.read === "read" ? availabilityQuery.data.ranges : [];
|
|
23724
23735
|
const recordedMs = ranges.reduce((acc, r) => acc + Math.max(0, r.endMs - r.startMs), 0);
|
|
23725
23736
|
const isRecording = status?.enabled === true && status.activeMode === "continuous";
|
|
23726
23737
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -23779,8 +23790,8 @@ function RecordingPanel({ deviceId }) {
|
|
|
23779
23790
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(WidgetMetricCard, {
|
|
23780
23791
|
label: "Recorded (24h)",
|
|
23781
23792
|
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Clock, { className: "h-3.5 w-3.5" }),
|
|
23782
|
-
footer: `${ranges.length} segment range${ranges.length === 1 ? "" : "s"}`,
|
|
23783
|
-
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)
|
|
23784
23795
|
})
|
|
23785
23796
|
]
|
|
23786
23797
|
}),
|
|
@@ -56453,9 +56464,6 @@ exports.useEventEmitterGetStatus = useEventEmitterGetStatus;
|
|
|
56453
56464
|
exports.useEventInvalidation = useEventInvalidation;
|
|
56454
56465
|
exports.useEventStreamLatest = useEventStreamLatest;
|
|
56455
56466
|
exports.useEventStreamMap = useEventStreamMap;
|
|
56456
|
-
exports.useEventsGetEventClipUrl = useEventsGetEventClipUrl;
|
|
56457
|
-
exports.useEventsGetEventThumbnail = useEventsGetEventThumbnail;
|
|
56458
|
-
exports.useEventsGetEvents = useEventsGetEvents;
|
|
56459
56467
|
exports.useFaceGalleryAssignFace = useFaceGalleryAssignFace;
|
|
56460
56468
|
exports.useFaceGalleryAssignFaces = useFaceGalleryAssignFaces;
|
|
56461
56469
|
exports.useFaceGalleryAuditIdentitySamples = useFaceGalleryAuditIdentitySamples;
|
|
@@ -56925,10 +56933,40 @@ exports.usePtzSetHomeReturn = usePtzSetHomeReturn;
|
|
|
56925
56933
|
exports.usePtzStop = usePtzStop;
|
|
56926
56934
|
exports.useRebootReboot = useRebootReboot;
|
|
56927
56935
|
exports.useRecordedPlayback = useRecordedPlayback;
|
|
56928
|
-
exports.
|
|
56929
|
-
exports.
|
|
56930
|
-
exports.
|
|
56931
|
-
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;
|
|
56932
56970
|
exports.useRecordingExportCancelExport = useRecordingExportCancelExport;
|
|
56933
56971
|
exports.useRecordingExportCreateExport = useRecordingExportCreateExport;
|
|
56934
56972
|
exports.useRecordingExportDeleteExport = useRecordingExportDeleteExport;
|
|
@@ -56937,42 +56975,14 @@ exports.useRecordingExportGetExport = useRecordingExportGetExport;
|
|
|
56937
56975
|
exports.useRecordingExportListExports = useRecordingExportListExports;
|
|
56938
56976
|
exports.useRecordingExportReadExportBytes = useRecordingExportReadExportBytes;
|
|
56939
56977
|
exports.useRecordingGetAvailability = useRecordingGetAvailability;
|
|
56940
|
-
exports.useRecordingGetAvailabilityBatch = useRecordingGetAvailabilityBatch;
|
|
56941
56978
|
exports.useRecordingGetDaysWithRecordings = useRecordingGetDaysWithRecordings;
|
|
56942
|
-
exports.
|
|
56943
|
-
exports.
|
|
56944
|
-
exports.
|
|
56945
|
-
exports.useRecordingGetDeviceSettingsContribution = useRecordingGetDeviceSettingsContribution;
|
|
56946
|
-
exports.useRecordingGetPlacement = useRecordingGetPlacement;
|
|
56947
|
-
exports.useRecordingGetPlaybackManifest = useRecordingGetPlaybackManifest;
|
|
56948
|
-
exports.useRecordingGetRelocateResidue = useRecordingGetRelocateResidue;
|
|
56949
|
-
exports.useRecordingGetStatus = useRecordingGetStatus;
|
|
56950
|
-
exports.useRecordingGetStorageMigrationMoveStatus = useRecordingGetStorageMigrationMoveStatus;
|
|
56951
|
-
exports.useRecordingGetStorageUsage = useRecordingGetStorageUsage;
|
|
56952
|
-
exports.useRecordingListOpsLog = useRecordingListOpsLog;
|
|
56953
|
-
exports.useRecordingListRelocateJobs = useRecordingListRelocateJobs;
|
|
56954
|
-
exports.useRecordingLocateSegment = useRecordingLocateSegment;
|
|
56979
|
+
exports.useRecordingGetPlayback = useRecordingGetPlayback;
|
|
56980
|
+
exports.useRecordingGetPlaybackOptions = useRecordingGetPlaybackOptions;
|
|
56981
|
+
exports.useRecordingListSources = useRecordingListSources;
|
|
56955
56982
|
exports.useRecordingOnboardGetOptions = useRecordingOnboardGetOptions;
|
|
56956
56983
|
exports.useRecordingOnboardGetStatus = useRecordingOnboardGetStatus;
|
|
56957
56984
|
exports.useRecordingOnboardSetSettings = useRecordingOnboardSetSettings;
|
|
56958
|
-
exports.useRecordingPauseForStorageMigration = useRecordingPauseForStorageMigration;
|
|
56959
|
-
exports.useRecordingPlanStorageRebalance = useRecordingPlanStorageRebalance;
|
|
56960
|
-
exports.useRecordingPruneFootage = useRecordingPruneFootage;
|
|
56961
|
-
exports.useRecordingReadGopBytes = useRecordingReadGopBytes;
|
|
56962
|
-
exports.useRecordingReadSegmentBytes = useRecordingReadSegmentBytes;
|
|
56963
|
-
exports.useRecordingReadWindowBytes = useRecordingReadWindowBytes;
|
|
56964
|
-
exports.useRecordingReconcileLedgerAgainstDisk = useRecordingReconcileLedgerAgainstDisk;
|
|
56965
|
-
exports.useRecordingRefreshStorageLocationsForMigration = useRecordingRefreshStorageLocationsForMigration;
|
|
56966
|
-
exports.useRecordingRelocateFootage = useRecordingRelocateFootage;
|
|
56967
|
-
exports.useRecordingRenderClip = useRecordingRenderClip;
|
|
56968
|
-
exports.useRecordingRenderGif = useRecordingRenderGif;
|
|
56969
|
-
exports.useRecordingRescanStorage = useRecordingRescanStorage;
|
|
56970
|
-
exports.useRecordingResumeForStorageMigration = useRecordingResumeForStorageMigration;
|
|
56971
|
-
exports.useRecordingSetDeviceConfig = useRecordingSetDeviceConfig;
|
|
56972
|
-
exports.useRecordingSetDevicePlacement = useRecordingSetDevicePlacement;
|
|
56973
56985
|
exports.useRecordingSignalGetStatus = useRecordingSignalGetStatus;
|
|
56974
|
-
exports.useRecordingStartStorageMigrationMove = useRecordingStartStorageMigrationMove;
|
|
56975
|
-
exports.useRecordingStartStorageRebalance = useRecordingStartStorageRebalance;
|
|
56976
56986
|
exports.useRemoteComponent = useRemoteComponent;
|
|
56977
56987
|
exports.useRoleDisplayDefaults = useRoleDisplayDefaults;
|
|
56978
56988
|
exports.useSceneMonitorCaptureReference = useSceneMonitorCaptureReference;
|
|
@@ -57182,8 +57192,10 @@ exports.useValveStop = useValveStop;
|
|
|
57182
57192
|
exports.useVibrationGetStatus = useVibrationGetStatus;
|
|
57183
57193
|
exports.useVideoclipsDialClipStream = useVideoclipsDialClipStream;
|
|
57184
57194
|
exports.useVideoclipsGetClipPlayback = useVideoclipsGetClipPlayback;
|
|
57195
|
+
exports.useVideoclipsGetPlaybackOptions = useVideoclipsGetPlaybackOptions;
|
|
57185
57196
|
exports.useVideoclipsListClips = useVideoclipsListClips;
|
|
57186
57197
|
exports.useVideoclipsListSources = useVideoclipsListSources;
|
|
57198
|
+
exports.useVideoclipsOfferClipBytes = useVideoclipsOfferClipBytes;
|
|
57187
57199
|
exports.useVideoclipsReadClipBytes = useVideoclipsReadClipBytes;
|
|
57188
57200
|
exports.useVodPlayback = useVodPlayback;
|
|
57189
57201
|
exports.useWaterHeaterGetStatus = useWaterHeaterGetStatus;
|