f1u77y / wmc-mpris

MPRIS proxy for usage with Web Media Controller on GNU/Linux
The Unlicense
25 stars 1 forks source link

wmc-mpris doesn't get infromation from nor send commands to Firefox #6

Open cjpbirkbeck opened 4 years ago

cjpbirkbeck commented 4 years ago

So I have installed the web extension via Mozilla's Add-on store, got wmc-mpris installed via my distro's package manager. And it seems to work, with playerctl listing web-media-controller.

$ playerctl --list-all
mpd.instance28978
web-media-controller.pid27534
chromium.instance13752

But using playerctl <cmd>, doesn't to do anything. Following the advise here, I looked at the properties and found that it seems like web-media-controller does not get any information from Firefox/the web-media-controller.

$ dbus-send --print-reply --type=method_call --dest=org.mpris.MediaPlayer2.web-media-controller.pid27534 /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.GetAll string:'org.mpris.MediaPlayer2.Player'
method return time=1572478987.936083 sender=:1.321 -> destination=:1.335 serial=7 reply_serial=2
   array [
      dict entry(
         string "PlaybackStatus"
         variant             string ""
      )
      dict entry(
         string "LoopStatus"
         variant             string ""
      )
      dict entry(
         string "Rate"
         variant             double 1
      )
      dict entry(
         string "Shuffle"
         variant             boolean false
      )
      dict entry(
         string "Metadata"
         variant             array [
            ]
      )
      dict entry(
         string "Volume"
         variant             double 0
      )
      dict entry(
         string "Position"
         variant             int64 0
      )
      dict entry(
         string "MinimumRate"
         variant             double 1
      )
      dict entry(
         string "MaximumRate"
         variant             double 1
      )
      dict entry(
         string "CanGoNext"
         variant             boolean false
      )
      dict entry(
         string "CanGoPrevious"
         variant             boolean false
      )
      dict entry(
         string "CanPlay"
         variant             boolean false
      )
      dict entry(
         string "CanPause"
         variant             boolean false
      )
      dict entry(
         string "CanSeek"
         variant             boolean false
      )
      dict entry(
         string "CanControl"
         variant             boolean false
      )
   ]
acrisci commented 4 years ago

If CanPlay is set to false and you issue a command to play, playerctl skips the player.