feat: change default player client order

This commit is contained in:
ThetaDev 2024-08-10 03:03:15 +02:00
parent 5e646afd1e
commit 97904d7737
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
2 changed files with 13 additions and 1 deletions

View file

@ -25,6 +25,7 @@ use super::{
player::{self, Format},
},
ClientType, MapRespCtx, MapResponse, MapResult, RustyPipeQuery, YTContext,
DEFAULT_PLAYER_CLIENT_ORDER,
};
#[derive(Debug, Serialize)]
@ -65,7 +66,7 @@ struct QContentPlaybackContext<'a> {
impl RustyPipeQuery {
/// Get YouTube player data (video/audio streams + basic metadata)
pub async fn player<S: AsRef<str> + Debug>(&self, video_id: S) -> Result<VideoPlayer, Error> {
self.player_from_clients(video_id, &[ClientType::Desktop, ClientType::TvHtml5Embed])
self.player_from_clients(video_id, DEFAULT_PLAYER_CLIENT_ORDER)
.await
}