fent / node-ytdl-core

YouTube video downloader in javascript.
MIT License
4.48k stars 793 forks source link

ytdl seems conflicted if `requestOptions.headers` has `range` on it. #1177

Open Yonle opened 1 year ago

Yonle commented 1 year ago

Hi. I have a project called ytmous, and wanting to put my own range header with ytdl.downloadFromInfo(..., { requestOptions: { headers: { range: "...." } } }) so my project could let my clients to seek a video.

But the problem is, This code here seems only checking to options.range.start:

https://github.com/fent/node-ytdl-core/blob/99e6c678eb8cf8f330479539ad08ab6a0d444322/lib/index.js#L137-L138

So i wonder if there's any way to solve this problem? Because even i use options.range.start:

https://github.com/ytmous/ytmous/blob/nightly/index.js#L191-L193

It's still did not let me to seek any way. Even it does put { start: 1234567 }, Firefox is yelling that the video format is corrupted.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.