Skip to content

best way to save what you love

api/youtube: disable HLS if a session server is used

wukkod1b5983e492d
diff --git a/api/src/processing/services/youtube.js b/api/src/processing/services/youtube.js
index a10a8b08..ca46d22f 100644
--- a/api/src/processing/services/youtube.js
+++ b/api/src/processing/services/youtube.js
@@ -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";
}