browser-media-keys
browser-media-keys copied to clipboard
GMail capturing MediaKeys input
Hello! Love the plugin, nice work! I use it mainly to control spotify web player, and I noticed that when I open the gmail tab the media keys stop working for the spotify tab until I open up the it again. I'm not sure if it's the expected behavior (it also happens if youtube is opened and tab has been active). Closing the tab doesn't bring the add-on focus to spotify again.
Also, would it be possible to add something like a whitelist or blacklist to enable/disable the extension for certain websites? This would work out for my problem (though the issue would still be there for users using MediaKeys for both sites).
I am using Media Keys 0.7.3 in Firefox 47 in an Ubuntu 14.04 computer.
Thank you, Gerard
If you right click on your favorite media site tab there should be an option for "Pin Media Keys" that will lock the keys to that tab. That setting should persist forever, even if the tab is closed.
I'll look into the gmail problem. The only possible explanation for that is that somehow it's seeing a Google Music (play.google.com) component in Gmail.
Ok, I cannot reproduce the issue with gmail. Are you using some sort of gmail plugin for playing media content? Maybe they added something that uses Google play to load multimedia in email or something. I'll need more info to figure this out.
Hi Carlin, The pin tabs feature sounds perfect to solve my problem, thanks!
As for gmail, this morning the issue was not happening until I opened youtube and then gmail started to capture the keys, as well as the youtube tab. This kept happening after youtube was closed. In this stage, focusing Spotify makes the media keys control spotify until gmail or youtube is focused.
As you can see in the picture, I was able to actually pin the Media Keys for the gmail tab. I'm not using any extension but the Media Keys and the "Ubuntu Modifications" which was installed by default.
I also noticed that youtube the add on is not working for youtube in my case. It's really weird, maybe something wrong with my set up or installation but don't really know what!
I'll try to keep going without pining the spotify tab and see if I can see any pattern.
Youtube doesn't work at all with the add-on for you? Are you using the flash or html5 player on youtube? You can check that simply by right-clicking on a video and it will say "About the html5 player" at the bottom if you're using that one.
Next time you get gmail.com to act like a media site, could you open the debugger and check if youtube.com or play.google.com are listed in the sources list? The add-on only runs for specific domains and those are the only google domains the add-on attaches to.
Hi Carlin, Just checked again, youtube is working though some times it stops doing so and a refresh of the page is needed to have it capturing the keys again. It is the html5 player. The times it stopped was after switching from the spotify tab, it kept on controlling that one even though youtube was the one in front (I'm not pinning spotify Media Keys now).
As for the gmail, I am experiencing it right now, and I don't see any url related to youtube or google play in the sources list of the debugger. But it seems that it doesn't happen until I open the youtube tab (in a clean firefox startup gmail does not interfere with spotify).
Moreover, now I'm seeing that the Pin Media Keys menu is shown in all the browser tabs (though only gmail is capturing them), and selecting it doesn't make anything, as the button keeps saying "Pin Media Keys", and there's no "Unpin" option then. I don't remind this happening yesterday, it is really weird.
PS. Just realised the addon was updated from 0.7.3 to 0.7.4, not sure if this could affect in any way.
The latest release modifies when the pin menu item shows up but it was only supposed to make it show up less, like when an update occurs. That's a different bug though so please file a new one for it.
I'll look through the code and see if there's any place where tabs are referenced outside of the context of a media page.
I reviewed the code and there's no place where a non-media tab is referenced so somehow Firefox is seeing youtube.com in gmail. Maybe it's some kind of race condition when switching from the gmail tab to the youtube tab. Can you reproduce this if the tab you had open before going to youtube is something other than gmail?
So it looks that I had the gmail in a private window, and it doesn't seem to happen when the window is non private.
So opening a private window with gmail, gmail works normal and doesn't capture media keys. Open youtube in the same private window and close it. From now on opening the gmail tab keeps the input keys. Doesn't seem to happen with non related gmail tabs.
Also checked having gmail in a new (non-private) window and getting the expected behaviour. I'm sorry, I should have realised that earlier...
Hmm, odd. I wonder why private works differently.