From a6df2ff7f4c55be98fb3e485bdad2b4cc6971cb2 Mon Sep 17 00:00:00 2001 From: Kayos Date: Sun, 24 May 2026 11:50:56 -0700 Subject: [PATCH] client: prefer iOS over Android in default order Android-only path requires Google device attestation (po_token / botguard signing). iOS path has neither attestation nor sig deobf requirements, so it's the cleanest "just works" default. Keep Android in the rotation only when botguard is wired. --- src/client/player.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/client/player.rs b/src/client/player.rs index 1fd00ab..1c5567d 100644 --- a/src/client/player.rs +++ b/src/client/player.rs @@ -245,15 +245,16 @@ impl RustyPipeQuery { /// The order may change in the future in case YouTube applies changes to their /// platform that disable a client or make it less reliable. pub fn player_client_order(&self) -> &'static [ClientType] { - // Default to the InnerTube clients that don't need player.js deobfuscation - // (Android, iOS). Tv is kept as a final fallback for when the mobile clients - // return degraded responses. Desktop is only used when botguard is wired - // (po_token signing) because it otherwise serves obfuscated URLs we can't - // currently deobf on YT's newer player versions. + // Default to iOS first — it skips player.js deobfuscation entirely (pre-signed + // stream URLs) AND doesn't require device attestation the way the Android + // client does. Tv is the secondary fallback (it does need a sig_timestamp + // request param, but its responses are typically OK). Android is included + // when botguard/po_token signing is wired because then we can satisfy YT's + // device attestation requirement. if self.client.inner.botguard.is_some() { - &[ClientType::Android, ClientType::Ios, ClientType::Desktop, ClientType::Tv] + &[ClientType::Ios, ClientType::Android, ClientType::Tv, ClientType::Desktop] } else { - &[ClientType::Android, ClientType::Ios, ClientType::Tv] + &[ClientType::Ios, ClientType::Tv] } }