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.
This commit is contained in:
parent
765a90e808
commit
a6df2ff7f4
1 changed files with 8 additions and 7 deletions
|
|
@ -245,15 +245,16 @@ impl RustyPipeQuery {
|
||||||
/// The order may change in the future in case YouTube applies changes to their
|
/// The order may change in the future in case YouTube applies changes to their
|
||||||
/// platform that disable a client or make it less reliable.
|
/// platform that disable a client or make it less reliable.
|
||||||
pub fn player_client_order(&self) -> &'static [ClientType] {
|
pub fn player_client_order(&self) -> &'static [ClientType] {
|
||||||
// Default to the InnerTube clients that don't need player.js deobfuscation
|
// Default to iOS first — it skips player.js deobfuscation entirely (pre-signed
|
||||||
// (Android, iOS). Tv is kept as a final fallback for when the mobile clients
|
// stream URLs) AND doesn't require device attestation the way the Android
|
||||||
// return degraded responses. Desktop is only used when botguard is wired
|
// client does. Tv is the secondary fallback (it does need a sig_timestamp
|
||||||
// (po_token signing) because it otherwise serves obfuscated URLs we can't
|
// request param, but its responses are typically OK). Android is included
|
||||||
// currently deobf on YT's newer player versions.
|
// when botguard/po_token signing is wired because then we can satisfy YT's
|
||||||
|
// device attestation requirement.
|
||||||
if self.client.inner.botguard.is_some() {
|
if self.client.inner.botguard.is_some() {
|
||||||
&[ClientType::Android, ClientType::Ios, ClientType::Desktop, ClientType::Tv]
|
&[ClientType::Ios, ClientType::Android, ClientType::Tv, ClientType::Desktop]
|
||||||
} else {
|
} else {
|
||||||
&[ClientType::Android, ClientType::Ios, ClientType::Tv]
|
&[ClientType::Ios, ClientType::Tv]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue