feat: add recording playback functionality

- Add getRecording service function to fetch single recording
- Update play page server to load recording from URL parameter
- Implement playback engine with event scheduling
- Add playback controls (play, pause, stop, seek)
- Display playback progress bar with clickable seek
- Show recording metadata and stats during playback
- Match recorded events to connected devices by name and actuator type
- Convert normalized values back to device scale for playback

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Valknar XXX
2025-10-28 05:28:04 +01:00
parent a252da6d9d
commit 50ceda94b7
3 changed files with 262 additions and 2 deletions

View File

@@ -613,3 +613,20 @@ export async function deleteRecording(id: string) {
{ id },
);
}
export async function getRecording(id: string, fetch?: typeof globalThis.fetch) {
return loggedApiCall(
"getRecording",
async () => {
const directus = getDirectusInstance(fetch);
const response = await directus.request<Recording>(
customEndpoint({
method: "GET",
path: `/sexy/recordings/${id}`,
}),
);
return response;
},
{ id },
);
}