carlin-q-scott / browser-media-keys

Lets you control many web players using the media keys on your keyboard.
Mozilla Public License 2.0
123 stars 31 forks source link

Mediakeys only work once #98

Closed Cogitri closed 6 years ago

Cogitri commented 7 years ago

Hello

Since the last update (6th of October) my media keys only work once (let's say for one "pause") and won't work afterwards. Tested it on both OpenSuse (with Firefox 49) and Gentoo (with Firefox 45.4). The web-console just drops a Empty string passed to getElementById(). once I invoke the first "pause", but I don't know if that is connected to the extension itself. When I open Firefox in a terminal I get the following output once I pause the playback: console.error: browsermediakeys: in mainthread EmitEventToActivePageWorker, aKeyName: MediaPlayPause

And this once I stop Firefox: console.error: browsermediakeys: called and did destroy

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38406640-mediakeys-only-work-once?utm_campaign=plugin&utm_content=tracker%2F7600490&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F7600490&utm_medium=issues&utm_source=github).
Noitidart commented 7 years ago

@carlin-q-scott this is the same thing @X-Ryl669 mentioned here on mac - https://github.com/carlin-q-scott/browser-media-keys/issues/96#issuecomment-253515559

carlin-q-scott commented 7 years ago

@Noitidart I don't see the relation between the two. X-Ryl669 didn't report the Empty string message. I also don't understand why the other two conole logs are errors; Those seems like expected events. I'll fix that right now.

@Keepco what website are you seeing the Empty string message for?

Cogitri commented 7 years ago

@carlin-q-scott I'm experiencing this error when I use this extension with my own Plexserver ( 2.8.1, using HTTPS, if that matters). Plex Domain is set to *.plex.tv https://192.168.1.2:32400/* I just tested it a bit more and noticed that once I tick/untick Windows alternative key support it works one more time, but stops working afterwards. Currently using Firefox 45.4//Mediakeys from 11/10/16//Gnome 3.20.2

X-Ryl669 commented 7 years ago

In order to track down this bug, I've experienced this, can you confirm you've the same issue:

  1. Load a (fresh) Firefox with the extension installed and with some session restoring a tab with music/video you want it to work with.
  2. Go to the tab you've selected for the extension
  3. Press a media key (it works once, not twice) / Or, alternatively, reload the tab, then it does not work, not even once
  4. Unpin the tab (right-click the tab, select "Unpin Media Keys")
  5. Pin the tab again (right-click the tab, select "Pin Media Keys")
  6. Now, it works well (as many times as you want)

If it's the case, @carlin-q-scott or @Noitidart, can you confirm you actually "repin" when the given tab reloads ?

cybercorey commented 7 years ago

Getting the same issue Firefox 52 on fedora 25 w/gnome