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

Wait for Mixer Commands to finish before resolving. #91

Open
mint-dewit opened this issue Dec 1, 2017 · 2 comments
Open

Wait for Mixer Commands to finish before resolving. #91

mint-dewit opened this issue Dec 1, 2017 · 2 comments

Comments

@mint-dewit
Copy link
Contributor

Sometimes mixer commands should resolve only when the transition is finished.

Possible implementations that come to my head right now:

@jesperstarkar
Copy link
Member

Thank you Balte. Brilliant idea.

@mint-dewit
Copy link
Contributor Author

mint-dewit commented Jun 20, 2018

As far as I can see CasparCG doesn't send any info about this. For anyone needing this right now, I'd advise to do the following:

caspar.mixerCropCommand(1, 10, 0, 0, 1, 1, 150)
.then((res) => {
  return new Promise((resolve) => {
    setTimeout(() => resolve(res), res.commandParameters.transitionDuration * frameDuration)
  })
}).then((res) => {
  // any regular response handling
})

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