From b4a5edf862550f93b6c951b31d4167469cfd4c3d Mon Sep 17 00:00:00 2001 From: Timo K Date: Fri, 1 Aug 2025 12:07:29 +0200 Subject: [PATCH] better safari check Signed-off-by: Timo K --- src/state/MediaDevices.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/state/MediaDevices.ts b/src/state/MediaDevices.ts index a81df9b1..1eba20a7 100644 --- a/src/state/MediaDevices.ts +++ b/src/state/MediaDevices.ts @@ -221,7 +221,9 @@ class AudioOutput type: "default", name: availableRaw[0]?.label || null, }); - if (navigator.userAgent.includes("Safari")) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const isSafari = !!(window as any).GestureEvent; // non standard api only found on Safari. https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent#browser_compatibility + if (isSafari) { // set to empty map if we are on Safari, because it does not support setSinkId available = new Map(); }