I recently added the MMM-NowPlayingOnSpotify to my magic mirror. It works but I want to try to make the pause icon functional.
I binded a eventListener click to the icon but here is the problem. Because of the fact (if I got this right) that the Dom is recreated every second (Every second the module asks the new data from spotify) the click event listener does not work properly. Sometimes the event is not triggerd because of the fact that the icon is not ready or binded.
Sometimes I trigger it, sometimes I don’t. Someone who knows how to solve it? I thought to update the dom every second instead of recreating it but that is a lot of adjustments I have to make.
If you have a idea, let me know please. Thanks!
ps: I know the module is meant to have a non-functional pause button but I would like to be able to pause music by touching the button on my mirror just because of the fact I don’t know if i’m going to implement voice control.