Fallback for post live dvr and OTF videos

This commit is contained in:
Brahim Hadriche committed 2025-11-03 13:23:05 -05:00
1 parent dd1cd8db97
commit 777b36852f
3 files changed
+23 -5

No files matched your search

+2 -2
View File
@@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Playback error when regular videos are returned with DRM protection
- Fallback to iOS HLS for post dvr videos
- Playback error when regular videos are returned with DRM protection (unless they are OTF)
- Fallback to iOS HLS for post dvr and OTF videos
## [0.43.3] - 2025-10-30
@@ -81,9 +81,9 @@ namespace InnertubeService
end if
playerResponseJson = playerResponse.Json()
isLiveOrPostLiveDvr = Innertube.IsLiveStream(playerResponseJson) or Innertube.IsPostLiveDvr(playerResponseJson)
if isLiveOrPostLiveDvr and client = Innertube.ClientType.Tv
LogDebug("Live video detected, falling back to iOS for HLS streams.")
notDashSupported = Innertube.IsLiveStream(playerResponseJson) or Innertube.IsPostLiveDvr(playerResponseJson) or Innertube.IsTypeOTF(playerResponseJson)
if notDashSupported and client = Innertube.ClientType.Tv
LogDebug("Falling back to iOS client for live/DVR/OTF video.")
isLoggedIn = Innertube.ParseIsLoggedIn(playerResponseJson)
playbackTrackingUrls = Innertube.ParsePlaybackTrackingUrls(playerResponseJson, isLoggedIn)
client = Innertube.ClientType.IOS
@@ -627,4 +627,22 @@ namespace Innertube
return false
end function
function IsTypeOTF(payload as object) as boolean
return FormatsHasTypeOTF(ObjectUtils.Dig(payload, ["streamingData", "adaptiveFormats"]))
end function
function FormatsHasTypeOTF(formats as object) as boolean
if not IsArray(formats)
return false
end if
for each fmt in formats
if ValidString(fmt["type"]) = "FORMAT_STREAM_TYPE_OTF"
return true
end if
end for
return false
end function
end namespace