I usually have a music player app and the web browser open. I sometimes pause the music player and watch something in the browser. When I then press pause, it should see that the browser has a playing item and pause that. And if I then press play, start that again.
If I then pause the browser with it's own controlls and start the media player, it should see that and pause the media player if I press on play/pause.