diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index 95fa3d79..ed31f0ad 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -53,6 +53,8 @@ end def extract_video_info(video_id : String) # Init client config for the API client_config = YoutubeAPI::ClientConfig.new + # use WEB screen embed for potoken functionality + client_config.client_type = YoutubeAPI::ClientType::WebEmbeddedPlayer # Fetch data from the player endpoint player_response = YoutubeAPI.player(video_id: video_id, params: "2AMB", client_config: client_config) diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr index d66bf7aa..6d6c72d1 100644 --- a/src/invidious/yt_backend/youtube_api.cr +++ b/src/invidious/yt_backend/youtube_api.cr @@ -291,8 +291,9 @@ module YoutubeAPI end if client_config.screen == "EMBED" + # embedUrl https://www.google.com allow loading 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