Fallback for post live dvr and OTF videos
This commit is contained in:
1 parent
dd1cd8db97
commit
777b36852f
3 files changed
+23
-5
No files matched your search
+2
-2
@@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Playback error when regular videos are returned with DRM protection
|
- Playback error when regular videos are returned with DRM protection (unless they are OTF)
|
||||||
- Fallback to iOS HLS for post dvr videos
|
- Fallback to iOS HLS for post dvr and OTF videos
|
||||||
|
|
||||||
## [0.43.3] - 2025-10-30
|
## [0.43.3] - 2025-10-30
|
||||||
|
|
||||||
|
|||||||
@@ -81,9 +81,9 @@ namespace InnertubeService
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
playerResponseJson = playerResponse.Json()
|
playerResponseJson = playerResponse.Json()
|
||||||
isLiveOrPostLiveDvr = Innertube.IsLiveStream(playerResponseJson) or Innertube.IsPostLiveDvr(playerResponseJson)
|
notDashSupported = Innertube.IsLiveStream(playerResponseJson) or Innertube.IsPostLiveDvr(playerResponseJson) or Innertube.IsTypeOTF(playerResponseJson)
|
||||||
if isLiveOrPostLiveDvr and client = Innertube.ClientType.Tv
|
if notDashSupported and client = Innertube.ClientType.Tv
|
||||||
LogDebug("Live video detected, falling back to iOS for HLS streams.")
|
LogDebug("Falling back to iOS client for live/DVR/OTF video.")
|
||||||
isLoggedIn = Innertube.ParseIsLoggedIn(playerResponseJson)
|
isLoggedIn = Innertube.ParseIsLoggedIn(playerResponseJson)
|
||||||
playbackTrackingUrls = Innertube.ParsePlaybackTrackingUrls(playerResponseJson, isLoggedIn)
|
playbackTrackingUrls = Innertube.ParsePlaybackTrackingUrls(playerResponseJson, isLoggedIn)
|
||||||
client = Innertube.ClientType.IOS
|
client = Innertube.ClientType.IOS
|
||||||
|
|||||||
@@ -627,4 +627,22 @@ namespace Innertube
|
|||||||
|
|
||||||
return false
|
return false
|
||||||
end function
|
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
|
end namespace
|
||||||
Reference in new issue
Block a user