Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upParse torrent file from XMLHttpRequest #424
Comments
This comment has been minimized.
This comment has been minimized.
|
I managed to get this working by using stream-http - thanks @jhiesey. You can see it in action here http://fastcast.nz/videos/cityscape-chicago-ii.html. Here's some of the code from my project (source)
|
This comment has been minimized.
This comment has been minimized.
|
It could be achieved without additional dependencies. The main idea is to convert from ArrayBuffer to Buffer.
|
This comment has been minimized.
This comment has been minimized.
|
Hey @vintikzzz, since the original post, the WebTorrent library (parse-torrent) added support for passing through a URL to a An example of this in action:
Note: In a browser the URL must have the header 'Access-Control-Allow-Origin' set while in Node.js, it doesn't mind. |
This comment has been minimized.
This comment has been minimized.
|
Thanks @vintikzzz and @SilentBot1 Good to know that this is supported in parse-torrent |
I want to stream a video in the browser from a .torrent file. To do this I have made an XHR request to return a buffer, which I want to parse with parse-torrent and download with WebTorrent. This is because I want to load the whole torrent file, so I can start streaming for a HTTP WebSeed, without having to wait for WebRTC peers to connect.
I don't know how to do this so help would be greatly appreciated. Here's my code: