You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
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).
The text was updated successfully, but these errors were encountered: