Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPRIS sharing code (interface to KDEConnect Android "Multimedia controls" plugin confuses multiple players #1780

Open
ferdnyc opened this issue Apr 3, 2024 · 0 comments
Labels
bug An issue that is confirmed as a bug

Comments

@ferdnyc
Copy link
Member

ferdnyc commented Apr 3, 2024

Describe the bug

Something is very wrong with the code to export local MPRIS player controls to remote devices.

It works fine at first, but quickly becomes confused when there's more than one player to be interacted with.

For example, I used my phone to control VLC on my desktop. That worked fine, at first.

Then I switched over to playing a YouTube video in Chrome. The "Multimedia controls" plugin interface has a "Chrome" item in its dropdown list of players, and if I switch to it, local actions (play/pause, seek, etc.) are reflected on the phone's display. But if I try to send any commands from the phone, they're ignored.

The reason, apparently, is that — despite the commands being directed to "Chrome" — GSConnect is trying to deliver them to a VLC interface that no longer exists:

Apr 03 17:57:58 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/device.js:_readLoop:364]: Galaxy A53 5G: 
{
  "id": 1712181478320,
  "type": "kdeconnect.mpris.request",
  "body": {
    "player": "Chrome",
    "SetPosition": 37203924
  }
}
Apr 03 17:57:58 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/components/mpris.js:_call/<:532]: 
org.mpris.MediaPlayer2.vlc.instance1437537: Destination does not exist
_call/<@.../[email protected]/service/components/mpris.js:532:27
@.../[email protected]/service/daemon.js:720:17
Apr 03 17:57:59 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/device.js:_readLoop:364]: Galaxy A53 5G: {
  "id": 1712181479232,
  "type": "kdeconnect.mpris.request",
  "body": {
    "player": "Chrome",
    "action": "PlayPause"
  }
}
Apr 03 17:57:59 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/components/mpris.js:_call/<:532]: 
org.mpris.MediaPlayer2.vlc.instance1437537: Destination does not exist
_call/<@.../[email protected]/service/components/mpris.js:532:27
@.../[email protected]/service/daemon.js:720:17

If I try to control VLC now, it's the same problem, because the current VLC instance isn't the same one that it was originally controlling, and it doesn't appear to have noticed:

Apr 03 18:03:21 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/device.js:_readLoop:364]: Galaxy A53 5G: {
  "id": 1712181800867,
  "type": "kdeconnect.mpris.request",
  "body": {
    "player": "VLC media player",
    "action": "PlayPause"
  }
}
Apr 03 18:03:21 org.gnome.Shell.Extensions.GSConnect[5559]: 
[/service/components/mpris.js:_call/<:532]: 
org.mpris.MediaPlayer2.vlc.instance1437537: Destination does not exist
_call/<@.../[email protected]/service/components/mpris.js:532:27
@.../[email protected]/service/daemon.js:720:17

Steps to reproduce

No response

Expected behavior

No response

GSConnect version

56

Installed from

GNOME Extensions website

GNOME Shell version

45.5

Linux distribution/release

Fedora 39

Paired device(s)

Samsung Galaxy A53

KDE Connect app version

1.29.0

Plugin(s)

Multimedia control

Support log

No response

Screenshots

No response

Notes

Discovered while attempting to debug #1779

@github-actions github-actions bot added the triage An issue that needs confirmation and labeling label Apr 3, 2024
@ferdnyc ferdnyc added bug An issue that is confirmed as a bug and removed triage An issue that needs confirmation and labeling labels Apr 3, 2024
@andyholmes andyholmes mentioned this issue Apr 5, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that is confirmed as a bug
Projects
None yet
Development

No branches or pull requests

1 participant