We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I don´t know if it´s a hard one to implement.
But when initialising a CG connection with autoConnect: false It would be great to have a promise when calling .connect() so I could do a
connection.connect() .then( setState......... etc.
Hope it makes sense :)
The text was updated successfully, but these errors were encountered:
If not I will find some function that gives a promise and use that. :)
Sorry, something went wrong.
This TOTALLY makes sense. This was my first project with promises, and my first library project. Would love to rewrite major parts of it.
Quick fix you can use for now if you want:
connect () { return new Promise((resolve, reject) => { const timeout = setTimeout(() => reject(), 10000) CasparCG.connect() CasparCG.once('connected', () => { clearTimeout(timeout) resolve() }) }) }
I just put the promise to another command and did this:
connection.connect() connection.stop(1, 10) .then( ..........
:)
jesperstarkar
No branches or pull requests
I don´t know if it´s a hard one to implement.
But when initialising a CG connection with autoConnect: false
It would be great to have a promise when calling .connect()
so I could do a
Hope it makes sense :)
The text was updated successfully, but these errors were encountered: