borismus/keysocket

Skip track skips twice - google music

Opened this issue · 9 comments

Using Google Muisc
Using G910 keyboard
Using Skip keys, either one.

When pressing the skip forward or backward, songs skip twice.
Ex: Playing song 1, press skip forward, now playing song 3.
Ex: Playing song 3, press skip backward, now playing song 1.

My assumption is that its registering on key press down and on key press up as 2 separate actions, thus skipping twice.

same problem. i use hyperx alloy fps.
Yandex Radio
Then i press Fn+F8 (forward track) it just start skipping tracks until i press Fn+F7 (stop\play)

upd/
i use yandex browser, but in chrome same problem

Google Play Music skipping forward and backwards works correctly for me with Apple wired keyboard on Windows 10 64-Bit with Chrome 68. Just posting this here so it's known that this issue doesn't affect everyone.

I can't reproduce it. @schelkov, @Slexara can you guys confirm that it's still an issue for you?

@feedbee [https://yadi.sk/i/s3YaQjn7kwG95w] here link for a video with problem. Вы с Минска? могу описать проблему на русском, когда нажимаю на кнопки вперед музыка может начать пропускаться пока не нажмешь стоп, и то не с первого раза стоп надо нажать раза два. Проблема не всегда проявляется с первого раза, иногда после того как нажмешь след трек то без проблем переключается. У моих друзей тоже такая проблема как в яндекс браузере так и в хроме. На сайте вк и на яндекс.радио.

This is an issue for me as well. I believe that the issue results from the fact that Google Play Music is already able to respond to the media keys on my keyboard. (Logitech G610) I like this extension because it also allows me to control YouTube playback, which doesn't normally work with my keyboard. It seems to me as though Google Play music is acknowledging the key press, and this extension is as well, which causes it to occur twice. I don't want to disable the extension every time I choose to use Google Play music. Is there any possibility of adding an option for preventing this extension from functioning with certain services? For example, an options menu or something that allows the user to 'turn off' Google Play Music (and/or other such sites/services), so that this extension still functions normally with all other services, just not the ones that have been 'turned off.'

It seems that browser sends two commands on single keypress to extension. It could be related to two-keys combination (FN+Smth), or driver. On extension side the handler is very simple.

In any case the only way to get dipper is to run a debug session on your machine. Would be perfect if somebody of you guys is able to do it by yourself. You have to download the source code, load unpacked extension in dev more and watch the console of background page.

how can i do it? any videos or lessons for this.

I can confirm that this issue is due to Google Music (or maybe just Chrome itself) supporting the previous/next hardware media keys. This wasn't the case in the past, but is now. I originally got this extension specifically because I couldn't use the hardware media keys on my wired Mac keyboard with Google Music.

I confirmed this by disabling the extension, and finding that previous/next media keys still worked, and only skipped back or ahead by one track. I don't see a way to disable this in Google Music, so it's either not possible, or it's Chrome that is supporting it natively.

I don't think the developer of this extension would be able to suppress this, unless there's a way to "hijack" that keypress and suppress Chrome from sending it to Google Music directly.

@plmcgrn it would be easy that this package would not enable itself if one is on a website which supports media keys already obviously.
To detect those either manual whitelist or check for eventlisteners related to media keys.