mirror of
https://github.com/wukko/cobalt.git
synced 2025-03-25 18:54:53 +01:00
api/youtube: disable HLS if a session server is used
This commit is contained in:
parent
4e6d1c4051
commit
d1b5983e49
1 changed files with 3 additions and 9 deletions
|
@ -151,22 +151,16 @@ export default async function (o) {
|
|||
} else throw e;
|
||||
}
|
||||
|
||||
const cookie = getCookie('youtube')?.toString();
|
||||
|
||||
let useHLS = o.youtubeHLS;
|
||||
|
||||
// HLS playlists don't contain the av1 video format, at least with the iOS client
|
||||
if (useHLS && o.format === "av1") {
|
||||
// HLS playlists don't contain the av1 video format.
|
||||
// if the session server is used, then iOS client will not work, at least currently.
|
||||
if (useHLS && (o.format === "av1" || env.ytSessionServer)) {
|
||||
useHLS = false;
|
||||
}
|
||||
|
||||
let innertubeClient = o.innertubeClient || env.customInnertubeClient || "ANDROID";
|
||||
|
||||
if (cookie) {
|
||||
useHLS = false;
|
||||
innertubeClient = "WEB";
|
||||
}
|
||||
|
||||
if (useHLS) {
|
||||
innertubeClient = "IOS";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue