Hi Joejsanz, First of all, thanks for your help. I've tried several tests and I think the problem is caused by both the web page opening in the background and the notification that displays the song title. My guess is that the notification is somehow gaining focus, and therefore the command no longer works. If I disable the web page from opening and dismiss the notification during the stop procedure, the start after stopping also works. Obviously, I have to press the headphones before the streaming begins, while the app is still buffering, because once the song starts and the song title is displayed, the headphones button stops working. Unfortunately, I don't know how the extension works, but I wanted to ask: would it be possible to add a function or variable to tell the headphone control to always keep focus on the player, thus preventing interference from other app functions?
The problem is that Android protects system multimedia sessions (WebView or Web is part of the system), and user apps have limitations to avoid breaking the multimedia experience.
Have you tried playing it directly from the protected URL in a player like ExoPlayer?
You could try it in the hybrid player I created, and if we can get it working there, you'd have the headphone clicks and button notifications working correctly.
It probably won't work in the published version, but I have an unpublished version that might work, or I could try to make it work with that URL.