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 upSupport Electron (atom-shell) or NW.js (node-webkit) #304
Comments
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
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! |
This comment has been minimized.
This comment has been minimized.
|
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) |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
WebTorrent is working well for me in electron. There is one issue I'm having with the videostream module though jhiesey/videostream#3 |
This comment has been minimized.
This comment has been minimized.
|
@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? |
This comment has been minimized.
This comment has been minimized.
|
@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 :) |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
Electron seems to be fully supported, now that there is https://github.com/feross/webtorrent-app |
This comment has been minimized.
This comment has been minimized.
|
@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 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. |
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