use WEB_CREATOR when po_token with WEB_EMBED as a fallback (#4928)

* use WEB_CREATOR when po_token with WEB_EMBEDDED_PLAYER as a fallback

* remove unrelated comment

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>

---------

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
This commit is contained in:
Émilien (perso)
2024-09-20 00:19:13 +02:00
committed by GitHub
parent cec3cfba77
commit d9df90b5e3
2 changed files with 29 additions and 8 deletions

View File

@@ -29,6 +29,7 @@ module YoutubeAPI
WebEmbeddedPlayer
WebMobile
WebScreenEmbed
WebCreator
Android
AndroidEmbeddedPlayer
@@ -80,6 +81,14 @@ module YoutubeAPI
os_version: WINDOWS_VERSION,
platform: "DESKTOP",
},
ClientType::WebCreator => {
name: "WEB_CREATOR",
name_proto: "62",
version: "1.20220918",
os_name: "Windows",
os_version: WINDOWS_VERSION,
platform: "DESKTOP",
},
# Android
@@ -291,8 +300,9 @@ module YoutubeAPI
end
if client_config.screen == "EMBED"
# embedUrl https://www.google.com allow loading almost all video that are configured not embeddable
client_context["thirdParty"] = {
"embedUrl" => "https://www.youtube.com/embed/#{video_id}",
"embedUrl" => "https://www.google.com/",
} of String => String | Int64
end