diff --git a/chrome/player/FastStreamClient.mjs b/chrome/player/FastStreamClient.mjs index e454388b..4278165e 100644 --- a/chrome/player/FastStreamClient.mjs +++ b/chrome/player/FastStreamClient.mjs @@ -245,7 +245,7 @@ export class FastStreamClient extends EventEmitter { this.options.visChangeAction = options.visChangeAction; this.options.miniSize = options.miniSize; this.options.miniPos = options.miniPos; - this.options.defaultYoutubeClient = options.defaultYoutubeClient2; + this.options.defaultYoutubeClient = options.defaultYoutubeClient3; if (sessionStorage && sessionStorage.getItem('autoplayNext') !== null) { this.options.autoplayNext = sessionStorage.getItem('autoplayNext') == 'true'; diff --git a/chrome/player/options/defaults/DefaultOptions.mjs b/chrome/player/options/defaults/DefaultOptions.mjs index 3ba911a9..9ed7fa41 100644 --- a/chrome/player/options/defaults/DefaultOptions.mjs +++ b/chrome/player/options/defaults/DefaultOptions.mjs @@ -17,7 +17,7 @@ export const DefaultOptions = { storeProgress: true, autoplayYoutube: EnvUtils.isExtension(), autoplayNext: false, - defaultYoutubeClient2: YoutubeClients.WEB, + defaultYoutubeClient3: YoutubeClients.WEB, defaultQuality: `Auto`, autoEnableURLs: [], customSourcePatterns: ``, diff --git a/chrome/player/options/options.mjs b/chrome/player/options/options.mjs index 12c07c6b..04904012 100644 --- a/chrome/player/options/options.mjs +++ b/chrome/player/options/options.mjs @@ -106,7 +106,7 @@ async function loadOptions(newOptions) { setSelectMenuValue(visChangeAction, Options.visChangeAction); setSelectMenuValue(miniPos, Options.miniPos); setSelectMenuValue(qualityMenu, Options.defaultQuality); - setSelectMenuValue(ytclient, Options.defaultYoutubeClient2); + setSelectMenuValue(ytclient, Options.defaultYoutubeClient3); if (Options.visChangeAction === VisChangeActions.MINI_PLAYER) { showWhenMiniSelected.style.display = ''; @@ -212,8 +212,8 @@ createSelectMenu(qualityMenu, Object.values(DefaultQualities), Options.defaultQu optionChanged(); }); -createSelectMenu(ytclient, Object.values(YoutubeClients), Options.defaultYoutubeClient2, null, (e) => { - Options.defaultYoutubeClient2 = e.target.value; +createSelectMenu(ytclient, Object.values(YoutubeClients), Options.defaultYoutubeClient3, null, (e) => { + Options.defaultYoutubeClient3 = e.target.value; optionChanged(); }); @@ -631,5 +631,3 @@ if (EnvUtils.isExtension()) { }); // SPLICER:NO_UPDATE_CHECKER:REMOVE_END } - -document.getElementById('ytc').style.display = ''; // SPLICER:CENSORYT:REMOVE_LINE diff --git a/chrome/player/players/yt/YTPlayer.mjs b/chrome/player/players/yt/YTPlayer.mjs index d81d7ba3..7b30eca0 100644 --- a/chrome/player/players/yt/YTPlayer.mjs +++ b/chrome/player/players/yt/YTPlayer.mjs @@ -241,7 +241,7 @@ export default class YTPlayer extends DashPlayer { const youtube = await Innertube.create({ cache, fetch: (mode === ClientType.IOS) ? this.youtubeFetchIOS.bind(this) : this.youtubeFetch.bind(this), - client_type: mode, + client_type: mode === ClientType.IOS ? undefined : mode, runner_location: 'https://sandbox.faststream.online/', });