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

Possible to get streamable URL? #1628

Closed
Daniele122898 opened this issue May 14, 2019 · 2 comments
Closed

Possible to get streamable URL? #1628

Daniele122898 opened this issue May 14, 2019 · 2 comments
Labels

Comments

@Daniele122898
Copy link

@Daniele122898 Daniele122898 commented May 14, 2019

Is it possible to get a streamable URL from a torrent. The file.appendTo function can stream the file. But to get the blobUrl the file needs to be fully downloaded first. Is there a way to get a streamable URL that i can hand to a custom player?

I'm writing an react app that has a custom player i use for synchronizing video with other ppl. It just needs a URL to play. Is that possible?

@jimmywarting

This comment has been minimized.

Copy link
Contributor

@jimmywarting jimmywarting commented May 14, 2019

What i think you want is actually file.renderTo(elm)
(you don't get the blob url, but you get to play it within your own player)
it has to put up some listener like seeking and all of that, so just having a blob url isn't enough

@feross feross added the question label Jul 27, 2019
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 27, 2019

Exactly what @jimmywarting said. There's not way to just get a URL to pass to your video player since the file has not been downloaded yet. We have to listen for seek events on the player, and prioritize downloaded pieces of the video that the user is trying to watch.

We may be able to solve this with the use of a Service Worker but it is currently not possible.

If you are running in Node.js you can use createServer() to get a URL that works even before the video is fully downloaded because then we can respond to the HTTP requests which are made to that server and use that to prioritize which pieces of the video to download.

@feross feross closed this Jul 27, 2019
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.