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 upSeeding a file from the local filesystem using Atom Electron (Including Windows) #305
Comments
This comment has been minimized.
This comment has been minimized.
|
same as #304 (comment) (also see https://github.com/feross/webtorrent-hybrid which now uses electron) This can probably be closed. |
This comment has been minimized.
This comment has been minimized.
|
Yep, this can be closed. WebTorrent works in Electron just fine. See: https://github.com/feross/webtorrent-app |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I read @feross is working on optimizing Webtorrent's Atom Electron support, so I've been playing around with some features to see to what points I can use the features until I run into issues.
An important concept for WebTorrent that becomes available with Electron, is node's file system. The ability to seed a file directly from the file system.
I've been trying to access a file from the local filesystem by entering the file's path as a string into the client.seed function.
Example:
On Windows it appears the Torrent hash appears after some time, but the hash remains unable to seed it to a WebRTC client (probably because there's no wrtc package support for Windows. I haven't tested this on Linux yet).
I also tried to browserify the code, which results in filesystem functions not being recognized as functions (ie: 'fs.readdir is not a function').
Possible solutions to get Webtorrent + Electron + filesystem working cross-platform would be:
Node WebRTC support for Windows (Seems to be the best solution. This also appears to be under active development: node-webrtc/node-webrtc#42)
Get filesystem to work in browserify bundle.js files when ran in Electron (I feel like this may already be possible with something like brfs, but haven't been able to figure this out yet).