Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to stream torrent while downloading? #1751

Closed
hardx4 opened this issue Sep 29, 2019 · 3 comments
Closed

How to stream torrent while downloading? #1751

hardx4 opened this issue Sep 29, 2019 · 3 comments
Labels

Comments

@hardx4
Copy link

@hardx4 hardx4 commented Sep 29, 2019

Hello everyone, first I want to thank you for this great project.

I can download the torrent via client.add, but I still can't understand how to stream it while downloading to the client browser. I saw in the documentation that there is the possibility of using createReadStream, but there is no example of use, could someone give me a hint?

I have only been able to transmit the file after the download completed.

@KayleePop

This comment has been minimized.

Copy link
Contributor

@KayleePop KayleePop commented Sep 30, 2019

I made this example to demonstrate

You can see that the subtitle file is streamed to the console before the torrent finishes downloading the full torrent because 'torrent fully downloaded' is logged much later after the entire video file is downloaded.

@KayleePop KayleePop added the question label Sep 30, 2019
@KayleePop

This comment has been minimized.

Copy link
Contributor

@KayleePop KayleePop commented Sep 30, 2019

closing to keep the issues clean. (feel free to ask follow up questions though)

@KayleePop KayleePop closed this Sep 30, 2019
@PaTiToMaSteR

This comment has been minimized.

Copy link

@PaTiToMaSteR PaTiToMaSteR commented Oct 1, 2019

@KayleePop I think that demo must be on the documentation as example of use. Looks really cool and simple!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.