web: add support for youtube hls
also increased api response timeout to 20 seconds
This commit is contained in:
@@ -26,6 +26,7 @@ const request = async (url: string) => {
|
||||
|
||||
youtubeVideoCodec: getSetting("save", "youtubeVideoCodec"),
|
||||
videoQuality: getSetting("save", "videoQuality"),
|
||||
youtubeHLS: getSetting("save", "youtubeHLS"),
|
||||
|
||||
filenameStyle: getSetting("save", "filenameStyle"),
|
||||
disableMetadata: getSetting("save", "disableMetadata"),
|
||||
@@ -82,7 +83,7 @@ const request = async (url: string) => {
|
||||
const response: Optional<CobaltAPIResponse> = await fetch(api, {
|
||||
method: "POST",
|
||||
redirect: "manual",
|
||||
signal: AbortSignal.timeout(10000),
|
||||
signal: AbortSignal.timeout(20000),
|
||||
body: JSON.stringify(request),
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
|
||||
@@ -26,6 +26,7 @@ const defaultSettings: CobaltSettings = {
|
||||
videoQuality: "1080",
|
||||
youtubeVideoCodec: "h264",
|
||||
youtubeDubBrowserLang: false,
|
||||
youtubeHLS: false,
|
||||
},
|
||||
privacy: {
|
||||
alwaysProxy: false,
|
||||
|
||||
@@ -48,6 +48,7 @@ type CobaltSettingsSave = {
|
||||
videoQuality: typeof videoQualityOptions[number],
|
||||
youtubeVideoCodec: typeof youtubeVideoCodecOptions[number],
|
||||
youtubeDubBrowserLang: boolean,
|
||||
youtubeHLS: boolean,
|
||||
};
|
||||
|
||||
export type CurrentCobaltSettings = {
|
||||
|
||||
Reference in New Issue
Block a user