avoid decipher on ios and android
This commit is contained in:
parent
3b3ab33b54
commit
608f177bcb
1 changed files with 30 additions and 27 deletions
|
@ -32,7 +32,9 @@ export const youtubePlayerParsing = async (
|
|||
|
||||
// Modify the original YouTube response to include deciphered URLs
|
||||
if (streamingData && videoData && videoData.streamingData) {
|
||||
streamingData.adaptive_formats;
|
||||
const ecatcherServiceTracking = videoData.responseContext?.serviceTrackingParams.find(o => o.service === 'ECATCHER');
|
||||
const clientNameUsed = ecatcherServiceTracking?.params?.find(o => o.key === 'client.name');
|
||||
if (clientNameUsed?.value.includes("IOS") || clientNameUsed?.value.includes("ANDROID")) {
|
||||
for (const [index, format] of streamingData.formats.entries()) {
|
||||
videoData.streamingData.formats[index].url = format.decipher(
|
||||
innertubeClient.session.player,
|
||||
|
@ -64,6 +66,7 @@ export const youtubePlayerParsing = async (
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const videoOnlyNecessaryInfo = ((
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue