Git Product home page Git Product logo

Comments (6)

Spiffyk avatar Spiffyk commented on June 23, 2024

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.

Spiffyk avatar Spiffyk commented on June 23, 2024

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.

haltcase avatar haltcase commented on June 23, 2024

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.

Spiffyk avatar Spiffyk commented on June 23, 2024

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.

Spiffyk avatar Spiffyk commented on June 23, 2024

Just updated the title to make the problem more clear.

from twitch-node-sdk.

haltcase avatar haltcase commented on June 23, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.