diff --git a/CHANGELOG.md b/CHANGELOG.md index f845ee84..e1b29bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Nothing worth mentioning yet. +### Fixed + +- Playback error when playing post live dvr videos ## [0.41.6] - 2025-09-06 diff --git a/playlet-lib/src/components/Services/Innertube/InnertubeService.bs b/playlet-lib/src/components/Services/Innertube/InnertubeService.bs index 670db5fd..bb3f38b4 100644 --- a/playlet-lib/src/components/Services/Innertube/InnertubeService.bs +++ b/playlet-lib/src/components/Services/Innertube/InnertubeService.bs @@ -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) diff --git a/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs b/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs index f83a1153..dfd3fdcb 100644 --- a/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs +++ b/playlet-lib/src/components/Services/Innertube/PlayerEndpoint.bs @@ -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": [] diff --git a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/HlsRouter.bs b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/HlsRouter.bs index 0407cab9..a10a37ce 100644 --- a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/HlsRouter.bs +++ b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/HlsRouter.bs @@ -122,7 +122,7 @@ namespace Http end if ' TODO:P2: handle live videos - if ValidBool(metadata.liveNow) + if ValidBool(metadata.liveNow) or ValidBool(metadata.isLiveContent) return hlsManifest end if