From baf151d9c041e2dc4041cfef0fcd5703e6ce325d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20T=C3=A4kker?= Date: Tue, 17 Feb 2026 12:05:55 +0100 Subject: [PATCH] Updated player plugin to work on the server --- app/plugins/{player.client.ts => player.ts} | 3 +++ 1 file changed, 3 insertions(+) rename app/plugins/{player.client.ts => player.ts} (97%) diff --git a/app/plugins/player.client.ts b/app/plugins/player.ts similarity index 97% rename from app/plugins/player.client.ts rename to app/plugins/player.ts index 5428ca0..ebc5a52 100644 --- a/app/plugins/player.client.ts +++ b/app/plugins/player.ts @@ -11,6 +11,7 @@ export default defineNuxtPlugin((nuxtApp) => { // Helpers const updateMediaSession = async () => { + if (!import.meta.client) return if (!navigator.mediaSession) { console.warn("Media Session API is not supported") return @@ -37,6 +38,7 @@ export default defineNuxtPlugin((nuxtApp) => { } const createHowl = async (song: Track) => { + if (!import.meta.client) return if (!song) throw new Error("Song not provided") const newSound = new Howl({ @@ -177,6 +179,7 @@ export default defineNuxtPlugin((nuxtApp) => { setSecondsPlayed, setVolume, getVolume, + queue, }, }, }