Adds initial player component

This commit is contained in:
Ollie Taylor
2023-02-21 23:54:18 +00:00
parent 8734ef7617
commit fd02effb82
4 changed files with 108 additions and 3 deletions
+10
View File
@@ -0,0 +1,10 @@
export type PlayerElement = HTMLAudioElement | undefined;
export function usePlayer<K extends keyof HTMLAudioElement>(
el: PlayerElement,
key: K,
value: HTMLAudioElement[K]
) {
if (!el) return;
el[key] = value;
}