mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
web: deprecate youtube HLS, enable it only via env variable
Some checks are pending
Some checks are pending
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:
parent
863d39db6f
commit
5ea170a5ac
@ -12,11 +12,12 @@ them, you must specify them when building the frontend (or running a vite server
|
|||||||
|
|
||||||
`WEB_DEFAULT_API` is **required** to run cobalt frontend.
|
`WEB_DEFAULT_API` is **required** to run cobalt frontend.
|
||||||
|
|
||||||
| name | example | description |
|
| name | example | description |
|
||||||
|:---------------------|:----------------------------|:--------------------------------------------------------------------------------------------|
|
|:--------------------------------|:----------------------------|:--------------------------------------------------------------------------------------------------------|
|
||||||
| `WEB_HOST` | `cobalt.tools` | domain on which the frontend will be running. used for meta tags and configuring plausible. |
|
| `WEB_HOST` | `cobalt.tools` | domain on which the frontend will be running. used for meta tags and configuring plausible. |
|
||||||
| `WEB_PLAUSIBLE_HOST` | `plausible.io`* | enables plausible analytics with provided hostname as receiver backend. |
|
| `WEB_PLAUSIBLE_HOST` | `plausible.io`* | enables plausible analytics with provided hostname as receiver backend. |
|
||||||
| `WEB_DEFAULT_API` | `https://api.cobalt.tools/` | changes url which is used for api requests by frontend clients. |
|
| `WEB_DEFAULT_API` | `https://api.cobalt.tools/` | changes url which is used for api requests by frontend clients. |
|
||||||
|
| `ENABLE_DEPRECATED_YOUTUBE_HLS` | `true` | enables the youtube HLS settings entry; allows sending the related variable to the processing instance. |
|
||||||
|
|
||||||
\* don't use plausible.io as receiver backend unless you paid for their cloud service.
|
\* don't use plausible.io as receiver backend unless you paid for their cloud service.
|
||||||
use your own domain when hosting community edition of plausible. refer to their [docs](https://plausible.io/docs) when needed.
|
use your own domain when hosting community edition of plausible. refer to their [docs](https://plausible.io/docs) when needed.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import env from "$lib/env";
|
||||||
import API from "$lib/api/api";
|
import API from "$lib/api/api";
|
||||||
import settings from "$lib/state/settings";
|
import settings from "$lib/state/settings";
|
||||||
import lazySettingGetter from "$lib/settings/lazy-get";
|
import lazySettingGetter from "$lib/settings/lazy-get";
|
||||||
@ -60,7 +61,7 @@ export const savingHandler = async ({ url, request, oldTaskId }: SavingHandlerAr
|
|||||||
|
|
||||||
youtubeVideoCodec: getSetting("save", "youtubeVideoCodec"),
|
youtubeVideoCodec: getSetting("save", "youtubeVideoCodec"),
|
||||||
videoQuality: getSetting("save", "videoQuality"),
|
videoQuality: getSetting("save", "videoQuality"),
|
||||||
youtubeHLS: getSetting("save", "youtubeHLS"),
|
youtubeHLS: env.ENABLE_DEPRECATED_YOUTUBE_HLS ? getSetting("save", "youtubeHLS") : undefined,
|
||||||
|
|
||||||
convertGif: getSetting("save", "convertGif"),
|
convertGif: getSetting("save", "convertGif"),
|
||||||
allowH265: getSetting("save", "allowH265"),
|
allowH265: getSetting("save", "allowH265"),
|
||||||
|
@ -9,13 +9,17 @@ const getEnv = (_key: string) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getEnvBool = (key: string) => {
|
||||||
|
return getEnv(key) === "true";
|
||||||
|
}
|
||||||
|
|
||||||
const variables = {
|
const variables = {
|
||||||
HOST: getEnv('HOST'),
|
HOST: getEnv('HOST'),
|
||||||
PLAUSIBLE_HOST: getEnv('PLAUSIBLE_HOST'),
|
PLAUSIBLE_HOST: getEnv('PLAUSIBLE_HOST'),
|
||||||
PLAUSIBLE_ENABLED: getEnv('HOST') && getEnv('PLAUSIBLE_HOST'),
|
PLAUSIBLE_ENABLED: getEnv('HOST') && getEnv('PLAUSIBLE_HOST'),
|
||||||
DEFAULT_API: getEnv('DEFAULT_API'),
|
DEFAULT_API: getEnv('DEFAULT_API'),
|
||||||
// temporary variable until webcodecs features are ready for testing
|
ENABLE_WEBCODECS: getEnvBool('ENABLE_WEBCODECS'),
|
||||||
ENABLE_WEBCODECS: !!getEnv('ENABLE_WEBCODECS'),
|
ENABLE_DEPRECATED_YOUTUBE_HLS: getEnvBool('ENABLE_DEPRECATED_YOUTUBE_HLS'),
|
||||||
}
|
}
|
||||||
|
|
||||||
const contacts = {
|
const contacts = {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import env from "$lib/env";
|
||||||
import settings from "$lib/state/settings";
|
import settings from "$lib/state/settings";
|
||||||
import { t } from "$lib/i18n/translations";
|
import { t } from "$lib/i18n/translations";
|
||||||
|
|
||||||
@ -54,20 +55,22 @@
|
|||||||
</Switcher>
|
</Switcher>
|
||||||
</SettingsCategory>
|
</SettingsCategory>
|
||||||
|
|
||||||
<SettingsCategory
|
{#if env.ENABLE_DEPRECATED_YOUTUBE_HLS}
|
||||||
sectionId="youtube-hls"
|
<SettingsCategory
|
||||||
title={$t("settings.video.youtube.hls")}
|
sectionId="youtube-hls"
|
||||||
disabled={$settings.save.youtubeVideoCodec === "av1"}
|
title={$t("settings.video.youtube.hls")}
|
||||||
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"}
|
disabled={$settings.save.youtubeVideoCodec === "av1"}
|
||||||
/>
|
beta
|
||||||
</SettingsCategory>
|
>
|
||||||
|
<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")}>
|
<SettingsCategory sectionId="h265" title={$t("settings.video.h265")}>
|
||||||
<SettingsToggle
|
<SettingsToggle
|
||||||
|
Loading…
Reference in New Issue
Block a user