When do you get the error? Is it every time that you click? What else are you doing in the code?
Not sure if this makes any difference, but togglePlay() returns a Promise which isn’t being handled. In your case, not sure that it matters.
When do you get the error? Is it every time that you click? What else are you doing in the code?
Not sure if this makes any difference, but togglePlay() returns a Promise which isn’t being handled. In your case, not sure that it matters.