frontend: Finish interactivity

This commit is contained in:
2025-02-15 16:28:47 -08:00
parent 9c4981b9cb
commit 79f53bbffe
9 changed files with 247 additions and 35 deletions

View File

@@ -51,6 +51,12 @@ apiRouter.post("/skip", withErrorHandling(async (req, res) => {
res.send(JSON.stringify({ success: true }));
}));
apiRouter.post("/skip/:index", withErrorHandling(async (req, res) => {
const { index } = req.params as { index: string };
await mediaPlayer.skipTo(parseInt(index));
res.send(JSON.stringify({ success: true }));
}));
apiRouter.post("/previous", withErrorHandling(async (req, res) => {
await mediaPlayer.previous();
res.send(JSON.stringify({ success: true }));