Fix playback error when playing post live dvr videos

This commit is contained in:
Brahim Hadriche committed 2025-09-06 19:51:11 -04:00
1 parent 8a458fb38b
commit 777a5b7311
4 files changed
+8 -4

No files matched your search

@@ -64,7 +64,7 @@ namespace InnertubeService
' # Start of iOS fallback
playbackTrackingUrls = invalid
responseJson = playerResponse.Json()
if ValidBool(ObjectUtils.Dig(responseJson, ["videoDetails", "isLive"]))
if ValidBool(ObjectUtils.Dig(responseJson, ["videoDetails", "isLive"])) or ValidBool(ObjectUtils.Dig(responseJson, ["videoDetails", "isLiveContent"]))
LogDebug("Live video detected, falling back to iOS for HLS streams.")
isLoggedIn = Innertube.ParseIsLoggedIn(responseJson)
playbackTrackingUrls = Innertube.ParsePlaybackTrackingUrls(responseJson, isLoggedIn)
@@ -86,6 +86,7 @@ namespace Innertube
lengthSeconds = videoDetails["lengthSeconds"].ToInt()
isLive = ValidBool(videoDetails["isLive"])
isLiveContent = ValidBool(videoDetails["isLiveContent"])
videoInfo = {
"type": "video"
@@ -97,9 +98,10 @@ namespace Innertube
"authorId": videoDetails["channelId"]
"lengthSeconds": lengthSeconds
"liveNow": isLive
"isLiveContent": isLiveContent
"hlsUrl": streamingData["hlsManifestUrl"]
"dashUrl": streamingData["dashManifestUrl"]
"adaptiveFormats": ParseAdaptiveFormats(payload, signatureTimestamp, isLive, cancellation)
"adaptiveFormats": ParseAdaptiveFormats(payload, signatureTimestamp, isLive or isLiveContent, cancellation)
"formatStreams": []
"captions": ParseCaptions(payload)
"recommendedVideos": []