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] } }