Skip to content
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

OBSWebSocket.on response object has wrong type for 'ScenesChanged' event #228

Open
2bdkid opened this issue Mar 24, 2021 · 1 comment
Open

Comments

@2bdkid
Copy link

2bdkid commented Mar 24, 2021

Description:

It appears the OBSWebSocket.on response object for the 'ScenesChanged' event is void.

According to the protocol, the response object should have a scenes property of type OBSWebSocket.Scene[] but Typescript says there's no parameter at all, void.

import OBSWebSocket from 'obs-websocket-js';
const obs = new OBSWebSocket();
obs.connect().catch(e => console.log(e));
obs.on('ScenesChanged', ({ scenes }) => {
  // blah
});

Versions Used (if applicable):

  • obs-websocket-js version: ^4.0.2
  • obs-websocket plugin version: latest
  • obs-studio version: latest
  • node version: v14.16.0
@2bdkid 2bdkid changed the title OBSWebSocket.on has wrong response type for 'ScenesChanged' event OBSWebSocket.on response object has wrong type for 'ScenesChanged' event Mar 24, 2021
@Panger95
Copy link
Collaborator

I can't seem to reproduce this issue.

I have a feeling it is due to having obs.on('ScenesChanged', ({ scenes }) => { the scenes part be inside curly braces. Try removing the curly braces around scenes and see if you are still having issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants