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

Seeding a file from the local filesystem using Atom Electron (Including Windows) #305

Closed
iadj opened this issue May 2, 2015 · 3 comments

Comments

@iadj
Copy link

iadj commented May 2, 2015

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:

client.seed('L:/image.jpg', function onTorrent (torrent) {
      // Client is seeding the file!
      console.log('Torrent info hash: ' + torrent.infoHash)
 })

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).

@rom1504
Copy link
Member

rom1504 commented Mar 19, 2016

same as #304 (comment) (also see https://github.com/feross/webtorrent-hybrid which now uses electron)

This can probably be closed.

@feross
Copy link
Member

feross commented Mar 24, 2016

Yep, this can be closed. WebTorrent works in Electron just fine. See: https://github.com/feross/webtorrent-app

@feross feross closed this as completed Mar 24, 2016
@lock
Copy link

lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants