feat: currently playing + volume + seek position + toggle pause

This commit is contained in:
2024-11-24 23:35:14 +01:00
parent 7ae47d02f2
commit 2b471c6296
19 changed files with 1015 additions and 77 deletions

17
src/lib/proto.ts Normal file
View File

@@ -0,0 +1,17 @@
export function serializable<F, T extends object = object>(data: T): F {
const obj = {};
for (const key in data) {
const value = data[key];
if (typeof value === 'object') {
/// @ts-ignore
obj[key] = serializable(value);
} else {
/// @ts-ignore
obj[key] = value;
}
}
return obj as unknown as F;
}