https://bugs.kde.org/show_bug.cgi?id=502501
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |unbounded_finisher309@drali | |as.com --- Comment #3 from [email protected] --- I have also noticed this issue with my BOSE QuietComfort Headphones. Exact same setup where using the media buttons on the headphones works just fine but the media keys on my keyboard are only able to pause after which the phantom player is automatically selected instead of the intended player, for example mpv, VLC, Strawberry all do not work. I have looked into the source code and have found the following function which I think might be the issue. The funcion is located in plasma-workspace/libkmpris/multiplexer.cpp file. My understanding is that currently when the playback status changes i.e. when starting or stopping it is ran. When the media player is started it works correctly as it keeps the active player, but when it is stopped, it then changes to a new player that is currently playing, which for some reason the headphones comes up as playing and hijacks and becomes the active media player. Current: void Multiplexer::onPlaybackStatusChanged() { // m_activePlayer can't be nullptr here, otherwise something is wrong if (m_activePlayer->playbackStatus() == PlaybackStatus::Playing) { // Keep the current player return; } auto *container = static_cast<PlayerContainer *>(sender()); if (container->playbackStatus() == PlaybackStatus::Playing) { // Use the new player m_activePlayer = container; updateIndex(); } else { evaluatePlayers(); } } A solution would be to check the canControl(), hasTrackList() or identity() of the container to see if it actually has media loaded into it or if it is the phantom headphone media player. -- You are receiving this mail because: You are watching all bug changes.
