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

Does Webtorrent works on node.js on server ? #1295

Closed
Er-rchydy opened this issue Feb 16, 2018 · 3 comments
Closed

Does Webtorrent works on node.js on server ? #1295

Er-rchydy opened this issue Feb 16, 2018 · 3 comments

Comments

@Er-rchydy
Copy link

@Er-rchydy Er-rchydy commented Feb 16, 2018

I don't know if Webtorrent work on server or not, i made a simple test but it didn't work.
this is the code i use :
var WebTorrent = require('webtorrent');
var client = new WebTorrent();
client.seed('./out.mp4', function (torrent) {
console.log('Seeding out.mp4: ', torrent.infoHash)
})
i got this on the output Seeding out.mp4 : bbd73a021f02c6e21f619ddf3f3bb602e96d9f07, but when i copy the torrent infoHash and paste it to instant.io, it didn't play, i didn't get any error
the server is running Centos7

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Feb 16, 2018

By default if you use 'webtorrent' in Node.js, it won't connect to browser peers. You need to use webtorrent-hybrid.

@feross feross closed this Feb 16, 2018
@Er-rchydy

This comment has been minimized.

Copy link
Author

@Er-rchydy Er-rchydy commented Feb 17, 2018

@feross I did tried webtorrent-hybrid too but it gives me this error
events.js:183
throw er; // Unhandled 'error' event
^
Error: electron-eval error: Electron process exited with code 127.
Stderr:
/root/app/node_modules/electron/dist/electron: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Feb 17, 2018

It looks like Electron (which gives the WebRTC implementation we use) doesn't provide pre-built binaries for CentOS: electron/electron#259

@lock lock bot locked as resolved and limited conversation to collaborators May 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.