I'm working in a web application that allows user to create a scene using canvas element, and then using Web Audio Api the scene changes accordingly with extracted frequencies in real time (creating audio visualizations). I implemented the interactivity with canvas with eventListeners.
My question here is if there is a way to disable canvas interaction (stop eventListeners) while the song is playing (the scene is changing) and after user stops it, the scene can be modified again.
Thank you all.