Bug 398073

Summary: Browser interaction working improperly with Google Play Music
Product: [Plasma] plasma-browser-integration Reporter: Jan Neumann <koglimail>
Component: generalAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED WORKSFORME    
Severity: normal CC: james
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jan Neumann 2018-08-30 16:41:11 UTC
If I'm listening to music in a browser using Google Play Music and press pause using Plasma browser integration, the music does pause, but it automatically resumes in about 10 seconds.

Once you press the Plasma pause button, the in-browser play/pause button (the one in the Google Play web application) switches to "press to play" state and _immediately_ switches back to "press to pause" state, even though music actually did stop playing. If you press this button at this point, it does not work. Then, in a couple seconds, music auto-resumes. It seems that Plasma browser integration puts Google Play Music into a broken state that the app does not expect.

This makes Plasma browser integration unusable with Google Play Music.

Tried in both Chrome and Firefox. Same behavior.
Comment 1 Kai Uwe Broulik 2019-05-07 20:27:57 UTC
I can confirm, something funky is going on. I'm not sure this can be fixed.
The website doesn't register any media session callbacks and when I just pause all audio and video it just sits there confused without being able to unpause it again.
Comment 2 James Lee 2019-05-07 20:37:16 UTC
For what it's worth, this extension https://github.com/beingmohit/browser-playerctl works perfectly with Google Play Music, but it handles GPM specially which may not extend to the generic nature of plasma-browser-integration.
Comment 3 Kai Uwe Broulik 2019-05-08 07:22:03 UTC
Yeah that extension just sends clicks to the respective buttons. Our extension is generic and should stay that way.
Comment 4 Kai Uwe Broulik 2020-04-09 17:38:22 UTC
It appears Play Music now does Media Session API, i.e. it gives us a proper "pause" callback we can use, so we don't have to blatantly call pause() on its player which it still doesn't like.