From 5167ea9ef0e8c7f2ad53e6ee50c6ea558cfb2636 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Sun, 19 Dec 2021 17:17:21 +0100 Subject: [PATCH] Fix streaming with HTML data --- play-dl/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/play-dl/index.ts b/play-dl/index.ts index 1bb420f..1700139 100644 --- a/play-dl/index.ts +++ b/play-dl/index.ts @@ -120,6 +120,7 @@ export async function stream(url: string, options?: StreamOptions): Promise { if (url.length === 0) throw new Error('Stream URL has a length of 0. Check your url again.'); + if (options.htmldata) return await yt_stream(url, options); if (url.indexOf('spotify') !== -1) { throw new Error( 'Streaming from Spotify is not supported. Please use search() to find a similar track on YouTube or SoundCloud instead.'