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
Support Electron (atom-shell) or NW.js (node-webkit) #304
Comments
Hi I'm facing the same issues where WebTorrent doesn't play nice with node-webkit. I believe you can load webtorrent in a child process so it won't conflict with node-webkit. An example on how to get this working would be a great help to me. |
What issues are you seeing in NW.js? Hm, I'm going to work on getting WebTorrent working in Electron (atom-shell) right now and fix problems as they come up. Electron is sufficiently similar to NW.js that this might fix your issue. If there are other lingering NW.js issues, PR welcome! |
I don't see any specific issues. Just guessing. Electron look like have different from nw.js arcitecture. Electron has 1 process for node and 1 process for chromium, each with different enviroments. nw.js has enviroments of node.js and chromium in 1 process (you have (so because of this and the reason you will fix problems of Electron I will switch to it too) |
It looks like my issues are not related to electron or nw.js. I also tested WebTorrent in the terminal and it's not working on my system. It's very slow and the download is really unstable. Most of the time the download speed is 0B/s. I tried reinstalling node and WebTorrent but that didn't help. I'm using a macbook with Yosemite 10.10.3 Your help is very much appreciated. |
WebTorrent is working well for me in electron. There is one issue I'm having with the videostream module though jhiesey/videostream#3 |
@feross Same problem here. Cant get webtorrent working with nw.js. Suppose that webtorrent thinks its in browser context and uses only webtrc. Any workaround for this? |
@gyzerok This is not intended behavior. WebTorrent should use whatever capabilities are available. In nw.js, it should connect to tcp and webrtc peers. This isn't high priority for me at the moment. If you send a PR to fix the bug, I'll happily merge it though :) |
It seems to me that NW.JS and it's unified sexification model of Node and Webkit would in fact be quite ideal for this use case. When combining this and other tech using Electron it would seem one must create an IPC bridge between them, whereas the shared context of NW.JS would allow them to work together naturally (correct me if I am wrong as this area is of much interest to me) - as well as more efficiently (right?). Would outfitting Webtorrent with proper context detection/handling when used in either unified(nw), separate(electron), or browser(client) contexts solve these issue of compatibility? or is there more to this issue than I currently understand... @feross you mentioned fixing this to work with Electron, what is the status on this and if you don't mind my asking, what was/is necessary to happen in order to make this fix? I would be happy to provide a fix via PR as soon as I fully grok the problem. |
Electron seems to be fully supported, now that there is https://github.com/feross/webtorrent-app |
@rom1504 You're right. I consider this fixed now that we're actually using this in Electron :) In case folks missed the news, see WebTorrent.app: https://github.com/feross/webtorrent-app Grab a download here: https://github.com/feross/webtorrent-app/releases (We're only doing OS X builds for now, but Windows/Linux are coming very soon) |
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
Is it possible that webtorrent works bad in nw.io because of nw.io provide both node.js and browser enviroment in same time?
For e.g.
but in this case is better to use node.js since it has more privileges.
May some wrong detection of using dgram or ArrayBuffer.
Or code select buffer from browser (since it more natvie, or maybe more perfomant) but select node dgram and them are not compatible, etc
The text was updated successfully, but these errors were encountered: