From 5c0532fe3bebe30e563e34fd0bf4f771fa6a3f2e Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 16 May 2026 18:15:19 -0400 Subject: [PATCH] fix: drop DefaultVideo extension check from \$has_hls refs #4757 The str_ends_with(\$Event->DefaultVideo(), '.m3u8') clause overrode the user's codec choice for in-progress events: DefaultVideo is set to 'index.m3u8' by Event's constructor, so picking MP4 from the dropdown still routed through HLS. Base \$has_hls solely on on-disk manifest presence + codec being MP4HLS or auto. MJPEG already short-circuits earlier via \$video_tag. Reported by Copilot on PR #4835. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/skins/classic/views/event.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/skins/classic/views/event.php b/web/skins/classic/views/event.php index 891442acc..38563a802 100644 --- a/web/skins/classic/views/event.php +++ b/web/skins/classic/views/event.php @@ -355,13 +355,13 @@ if (file_exists($Event->Path().'/objdetect.jpg')) { Path() . '/index.m3u8') - && (($codec == 'MP4HLS') || ($codec == 'auto') - || str_ends_with($Event->DefaultVideo(), '.m3u8')); + && (($codec == 'MP4HLS') || ($codec == 'auto')); if ($has_hls) { $Server = $Event->Server(); $hlsSrc = $Server->PathToIndex() . '?view=view_hls&eid=' . $Event->Id();