diff --git a/account-proxy/lib/innertubeApi.js b/account-proxy/lib/innertubeApi.js index c025bca..3b1be0b 100644 --- a/account-proxy/lib/innertubeApi.js +++ b/account-proxy/lib/innertubeApi.js @@ -28,7 +28,7 @@ const generateApiRequestData = function (clientParams) { "screenWidthPoints": 834, "screenHeightPoints": 1051, "utcOffsetMinutes": 120, - "userInterfaceTheme": "USER_INTERFACE_THEME_DARK", + "userInterfaceTheme": clientParams.userInterfaceTheme, "connectionType": "CONN_CELLULAR_4G", "mainAppWebInfo": { "graftUrl": "https://www.youtube.com/watch?v=" + clientParams.videoId, diff --git a/account-proxy/lib/types.js b/account-proxy/lib/types.js index 697f5a3..fa171a3 100644 --- a/account-proxy/lib/types.js +++ b/account-proxy/lib/types.js @@ -29,6 +29,7 @@ class YouTubeClientParams { this.signatureTimestamp = 18834; this.hl = 'en'; this.startTimeSecs = 0; + this.userInterfaceTheme = 'USER_INTERFACE_THEME_DARK'; this.includeNext = false; } diff --git a/src/components/strategies/next.js b/src/components/strategies/next.js index 1cf4797..8b62f93 100644 --- a/src/components/strategies/next.js +++ b/src/components/strategies/next.js @@ -2,9 +2,11 @@ import { getYtcfgValue, isConfirmed, isEmbed } from '../../utils'; import { innertube, proxy } from '../endpoints'; export default function getUnlockStrategies(videoId, lastPlayerUnlockReason) { + const client = getYtcfgValue('INNERTUBE_CONTEXT'); const clientName = getYtcfgValue('INNERTUBE_CLIENT_NAME') || 'WEB'; const clientVersion = getYtcfgValue('INNERTUBE_CLIENT_VERSION') || '2.20220203.04.00'; const hl = getYtcfgValue('HL'); + const userInterfaceTheme = client.userInterfaceTheme; return [ /** @@ -18,9 +20,10 @@ export default function getUnlockStrategies(videoId, lastPlayerUnlockReason) { payload: { context: { client: { - clientName: clientName, - clientVersion: clientVersion, + clientName, + clientVersion, hl, + userInterfaceTheme, }, }, videoId, @@ -41,6 +44,7 @@ export default function getUnlockStrategies(videoId, lastPlayerUnlockReason) { clientName, clientVersion, hl, + userInterfaceTheme, isEmbed: +isEmbed, isConfirmed: +isConfirmed, },