mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Video Info bug fixes and stream improvements
This commit is contained in:
@@ -65,6 +65,8 @@ export async function stream_from_info(
|
||||
): Promise<YouTubeStream> {
|
||||
if (info.format.length === 0)
|
||||
throw new Error('Upcoming and premiere videos that are not currently live cannot be streamed.');
|
||||
if (options.quality && !Number.isInteger(options.quality))
|
||||
throw new Error("Quality must be set to an integer.")
|
||||
|
||||
const final: any[] = [];
|
||||
if (
|
||||
@@ -99,6 +101,7 @@ export async function stream_from_info(
|
||||
info.video_details.durationInSec,
|
||||
final[0].indexRange.end,
|
||||
Number(final[0].contentLength),
|
||||
Number(final[0].bitrate),
|
||||
info.video_details.url,
|
||||
options
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user