Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Video preview full screen on collection change #314

Unanswered
LucaHsign asked this question in Q&A
Discussion options

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);
 }
};
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /