-
Couldn't load subscription status.
- Fork 99
-
hi, i made a software that changes the current collection. i use obs preview to reproduce video but when i change collection the preview is closed and i have to manually reopen it.
I tried with the "OpenProjector" command but doesnt work.
I always get the error "OBSWebSocketError: Your request type is not valid."
this is my code for nodejs api
exports.setSceneCollection = async (req, res) => {
let obsData = await Obs.findOne({});
try {
await obs.connect(`ws://${obsData.ip}:4444`);
await obs.call('SetCurrentSceneCollection', {
'sceneCollectionName': req.body.name,
});
const sceneList = await obs.call('GetSceneList');
const collectionList = await obs.call('GetSceneCollectionList');
await obs.call(
"OpenProjector", {
type: "Preview",
monitor: 0
});
await obs.disconnect();
res.send({ status: 'ok', data: { ...collectionList, ...sceneList }, message: txt.success.operationDone });
} catch (e) {
console.log(e);
throw new Error(txt.fail.connectionObs);
}
};
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment