summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsyeopite <syeopite@syeopite.dev>2025-02-26 14:14:29 -0800
committersyeopite <syeopite@syeopite.dev>2025-02-26 14:14:29 -0800
commitfe4fa0480ac5c49131d63619bac111eca57ed2e5 (patch)
treea36b1eb96e125511847f9b2e6da5d81e7a5777ab /src
parentdbbcacc955b79b11554d8e5bda8a208c97e55508 (diff)
parent49afbf2a143e17857e6daf1727078f9a6ea7f961 (diff)
downloadinvidious-fe4fa0480ac5c49131d63619bac111eca57ed2e5.tar.gz
invidious-fe4fa0480ac5c49131d63619bac111eca57ed2e5.tar.bz2
invidious-fe4fa0480ac5c49131d63619bac111eca57ed2e5.zip
Fix HLS being used for non-livestream videos (#5189)
Invidious does not currently support non-livestream hls playback Originally, the HLS manifest check was essentially a boolean: if the HLS manifest field was present, it was assumed to be a livestream. Some videos include the HLS Manifest but aren't livestreams. In the case where they are livestreams, the video contains a videoType field with the value "Livestream". In the case that they're normal videos, the videoType is "Video". This is exposed via the `video.live_now` property. This commit just checks that `video.live_now` is true before treating it as a livestream
Diffstat (limited to 'src')
-rw-r--r--src/invidious/views/components/player.ecr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr
index 5c28358b..523f6bbf 100644
--- a/src/invidious/views/components/player.ecr
+++ b/src/invidious/views/components/player.ecr
@@ -4,7 +4,7 @@
<% if params.autoplay %>autoplay<% end %>
<% if params.video_loop %>loop<% end %>
<% if params.controls %>controls<% end %>>
- <% if (hlsvp = video.hls_manifest_url) && !CONFIG.disabled?("livestreams") %>
+ <% if (hlsvp = video.hls_manifest_url) && video.live_now && !CONFIG.disabled?("livestreams") %>
<source src="<%= URI.parse(hlsvp).request_target %><% if params.local %>?local=true<% end %>" type="application/x-mpegURL" label="livestream">
<% else %>
<% if params.listen %>