@mullz Now I get it. There is another bug in both the code from @oskaremilsson as well as the code from @jitmo. By using the .on method on the IR object, you add a new listener (i.e. append it to the list of listeners). You never remove the listeners, however. That's why all the registered listeners get called on every recordComplete event. You can for example use the .once method instead. Just remember to also manually remove the listener when you cancel the recording process using for example the .removeAllListeners method.
Subcategories