From 723622d80e8c4ae7bd72c406efd68f0649d14aa7 Mon Sep 17 00:00:00 2001 From: Natalie Bridgers Date: Tue, 19 May 2026 22:29:16 -0500 Subject: [PATCH] default to hls --- .../src/components/mobile-player/shared.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/js/components/src/components/mobile-player/shared.tsx b/js/components/src/components/mobile-player/shared.tsx index 15e2aca26..0c0fd575b 100644 --- a/js/components/src/components/mobile-player/shared.tsx +++ b/js/components/src/components/mobile-player/shared.tsx @@ -24,14 +24,10 @@ export function srcToUrl( if (props.src.startsWith("http://") || props.src.startsWith("https://")) { const segments = props.src.split(/[./]/); const suffix = segments[segments.length - 1]; - if (protocolSuffixes[suffix]) { - return { - url: props.src, - protocol: protocolSuffixes[suffix], - }; - } else { - throw new Error(`unknown playback protocol: ${suffix}`); - } + return { + url: props.src, + protocol: protocolSuffixes[suffix] ?? PlayerProtocol.HLS, + }; } let outUrl: string; if (protocol === PlayerProtocol.HLS) { -- 2.51.2