web: deprecate youtube HLS, enable it only via env variable
it's now disabled by default because if we ever need HLS for youtube in the future, it'll be managed by the processing instance, not the web client. will probably be removed completely in next major release.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import env from "$lib/env";
|
||||
import API from "$lib/api/api";
|
||||
import settings from "$lib/state/settings";
|
||||
import lazySettingGetter from "$lib/settings/lazy-get";
|
||||
@@ -60,7 +61,7 @@ export const savingHandler = async ({ url, request, oldTaskId }: SavingHandlerAr
|
||||
|
||||
youtubeVideoCodec: getSetting("save", "youtubeVideoCodec"),
|
||||
videoQuality: getSetting("save", "videoQuality"),
|
||||
youtubeHLS: getSetting("save", "youtubeHLS"),
|
||||
youtubeHLS: env.ENABLE_DEPRECATED_YOUTUBE_HLS ? getSetting("save", "youtubeHLS") : undefined,
|
||||
|
||||
convertGif: getSetting("save", "convertGif"),
|
||||
allowH265: getSetting("save", "allowH265"),
|
||||
|
||||
@@ -9,13 +9,17 @@ const getEnv = (_key: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
const getEnvBool = (key: string) => {
|
||||
return getEnv(key) === "true";
|
||||
}
|
||||
|
||||
const variables = {
|
||||
HOST: getEnv('HOST'),
|
||||
PLAUSIBLE_HOST: getEnv('PLAUSIBLE_HOST'),
|
||||
PLAUSIBLE_ENABLED: getEnv('HOST') && getEnv('PLAUSIBLE_HOST'),
|
||||
DEFAULT_API: getEnv('DEFAULT_API'),
|
||||
// temporary variable until webcodecs features are ready for testing
|
||||
ENABLE_WEBCODECS: !!getEnv('ENABLE_WEBCODECS'),
|
||||
ENABLE_WEBCODECS: getEnvBool('ENABLE_WEBCODECS'),
|
||||
ENABLE_DEPRECATED_YOUTUBE_HLS: getEnvBool('ENABLE_DEPRECATED_YOUTUBE_HLS'),
|
||||
}
|
||||
|
||||
const contacts = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import env from "$lib/env";
|
||||
import settings from "$lib/state/settings";
|
||||
import { t } from "$lib/i18n/translations";
|
||||
|
||||
@@ -54,20 +55,22 @@
|
||||
</Switcher>
|
||||
</SettingsCategory>
|
||||
|
||||
<SettingsCategory
|
||||
sectionId="youtube-hls"
|
||||
title={$t("settings.video.youtube.hls")}
|
||||
disabled={$settings.save.youtubeVideoCodec === "av1"}
|
||||
beta
|
||||
>
|
||||
<SettingsToggle
|
||||
settingContext="save"
|
||||
settingId="youtubeHLS"
|
||||
title={$t("settings.video.youtube.hls.title")}
|
||||
description={$t("settings.video.youtube.hls.description")}
|
||||
{#if env.ENABLE_DEPRECATED_YOUTUBE_HLS}
|
||||
<SettingsCategory
|
||||
sectionId="youtube-hls"
|
||||
title={$t("settings.video.youtube.hls")}
|
||||
disabled={$settings.save.youtubeVideoCodec === "av1"}
|
||||
/>
|
||||
</SettingsCategory>
|
||||
beta
|
||||
>
|
||||
<SettingsToggle
|
||||
settingContext="save"
|
||||
settingId="youtubeHLS"
|
||||
title={$t("settings.video.youtube.hls.title")}
|
||||
description={$t("settings.video.youtube.hls.description")}
|
||||
disabled={$settings.save.youtubeVideoCodec === "av1"}
|
||||
/>
|
||||
</SettingsCategory>
|
||||
{/if}
|
||||
|
||||
<SettingsCategory sectionId="h265" title={$t("settings.video.h265")}>
|
||||
<SettingsToggle
|
||||
|
||||
Reference in New Issue
Block a user