mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-30 09:55:18 +00:00
fix(FormatUtils#download): Add missing await for format.decipher() call in download function
The format.decipher() method returns a Promise<string>, but was being called without await. This could cause the format_url variable to be a Promise object instead of the expected URL string, leading to errors in subsequent fetch operations.
This commit is contained in:
@@ -31,7 +31,7 @@ export async function download(
|
||||
};
|
||||
|
||||
const format = chooseFormat(opts, streaming_data);
|
||||
const format_url = format.decipher(player);
|
||||
const format_url = await format.decipher(player);
|
||||
|
||||
// If we're not downloading the video in chunks, we just use fetch once.
|
||||
if (opts.type === 'video+audio' && !options.range) {
|
||||
|
||||
Reference in New Issue
Block a user