add wview fallback as well

This commit is contained in:
chrisk325 2026-03-01 18:24:18 +05:30 committed by GitHub
parent 2eea341578
commit 5391ebda85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,6 +109,19 @@ const TVHTML5_EMBEDDED_CONTEXT = {
},
};
// Web Embedded client — good fallback for content that rejects app clients
const WEB_EMBEDDED_CONTEXT = {
client: {
clientName: 'WEB_EMBEDDED_PLAYER',
clientVersion: '2.20240726.00.00',
hl: 'en',
gl: 'US',
},
thirdParty: {
embedUrl: 'https://www.youtube.com',
},
};
// ---------------------------------------------------------------------------
// Itag reference tables
// ---------------------------------------------------------------------------
@ -503,6 +516,11 @@ export class YouTubeExtractor {
context: TVHTML5_EMBEDDED_CONTEXT,
userAgent: 'Mozilla/5.0 (SMART-TV; Linux; Tizen 6.0)',
},
{
name: 'WEB_EMBEDDED',
context: WEB_EMBEDDED_CONTEXT,
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36',
},
];
let muxedFormats: InnertubeFormat[] = [];