by malkierian » Mon Apr 13, 2020 12:56 pm
So, I finally revisited this, and discovered a Node app called Browserify that seems to do just about everything I would have needed, except that the method I need to use to actually broadcast RPC changes uses a module that isn't available through Browserify (Node's net module). I'm in contact with the author of the JS framework for Discord's RPC, as well as on the Browserify IRC channel, to see if there's a way around that, but the only other option I could see is if you were to use Electron, which bridges Node and Chromium in one platform (which, though I don't know for sure as I've never transferred a strictly Chromium project to Electron, would probably be ridiculous to do for just one script).
EDIT: to be more specific, Node's net module is TCP connections, which is only experimentally available in Chrome, and I don't know if that is also available in chromium.
So, I finally revisited this, and discovered a Node app called Browserify that seems to do just about everything I would have needed, except that the method I need to use to actually broadcast RPC changes uses a module that isn't available through Browserify (Node's net module). I'm in contact with the author of the JS framework for Discord's RPC, as well as on the Browserify IRC channel, to see if there's a way around that, but the only other option I could see is if you were to use Electron, which bridges Node and Chromium in one platform (which, though I don't know for sure as I've never transferred a strictly Chromium project to Electron, would probably be ridiculous to do for just one script).
EDIT: to be more specific, Node's [i]net[/i] module is TCP connections, which is only experimentally available in Chrome, and I don't know if that is also available in chromium.