Comments (6)
It looks like the NWjs API (especially Window
for this case) has changed a lot between versions 0.12 and 0.13, rendering the twitch-sdk incompatible with it. I'll have to look into it in detail to fix it.
from twitch-node-sdk.
I just checked if NW.js 0.12.3 is working and it seems to be. 0.12.3 is the current stable version of NW.js so please stick to that one for now if that is possible for you.
Also, I can't seem to get the DevTools in NW.js 0.13 to work so I can't fix things until I get that sorted.
from twitch-node-sdk.
Ah, you're right I had forgotten to mention I was using 0.13.
As for the DevTools, there's no toolbar anymore in 0.13. To access them you can right click the page and choose inspect / inspect background page. Background in my case is my backend / server.
from twitch-node-sdk.
So, I have hopefully made the changes necessary to support NW.js 0.13 and pushed them to the repo. It still does not work, though, due to a bug in NW where the loaded
event of a Window does not fire and I have no way around that so we need to wait for the NW devs to fix that.
The syntax for NW.js 0.13 will be different from 0.12 because we don't need to pass the nw
object to the SDK anymore. It also makes a convenient way of keeping the SDK compatible with the older NW.js versions.
Twitch.init({
clientId: '<CLIENTID>',
session: status,
nw: true // we don't pass the nw object here, thus we have similar behaviour to electron
}, function(error, status) {
if (error) {
console.log(error);
}
if (status.authenticated) {
console.log('SYS: User is authenticated. ' + status);
}
});
I'll leave this issue open until I know for sure that it really works.
PS: the problem with DevTools was that I had the NORMAL flavor of NW.js while I was supposed to use the SDK one. Silly me 😃
from twitch-node-sdk.
Just updated the title to make the problem more clear.
from twitch-node-sdk.
Nicely done, NW has been quick to solve a lot of these issues from what I see so I'd think you'll be off & running soon enough. Thanks and I'll keep an eye out for 0.4.
from twitch-node-sdk.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitch-node-sdk.