Author Topic: Play/Pause Button inputs twice when Windows 10 Media Control Overlay is enabled.  (Read 19499 times)

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346


These buttons no longer work either. Though they use to.

Do they work in other applications such as Spotify?

I'm still convinced that this is a core Windows issue and not the plugin.

You could try a portable MB installation to test it.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344
is anyone willing to run a debug version of MusicBee and this plugin so i can get to the bottom of what is going on?

Freddy Barker

  • Sr. Member
  • ****
  • Posts: 751
  • 🎧 MB 3.4.7628P
is anyone willing to run a debug version of MusicBee and this plugin so i can get to the bottom of what is going on?

I'll install the plugin later today and check it out. Also happy to run a debug!
Freddy

Freddy Barker

  • Sr. Member
  • ****
  • Posts: 751
  • 🎧 MB 3.4.7628P
is anyone willing to run a debug version of MusicBee and this plugin so i can get to the bottom of what is going on?

I'll install the plugin later today and check it out. Also happy to run a debug!

Preliminary checks & report for current plugin version...

Using Media Control
The media keys all perform as expected, but ONLY Volume up or down displays the Media Control pop-up window.
I don't get double pause/play, next/previous issue, but the buttons on the pop-up do nothing.

Windows 10 Pro / Version 1903 / Build 18362.295
MusicBee v3.3.7175 P
MediaControl v1.0.1 [update 28/08/2019]

Check (1) Windows 10 Update hijacking.
Contol Panel > Programs > Default Programs > Set program access and computer defaults > Music player
(Probably been reset to Grove Music after Win 10 update?)
Click on default and select MusicBee from list.

Check (2) Chrome hijacking.
Disable "Google Play Music" or "Plex" Extensions from Chrome.

Check (3) Spotify hijacking.
Open Spotify > Display Option (settings) > Uncheck option "Desktop overlay when using media keys"

Freddy
Last Edit: August 29, 2019, 02:08:12 PM by Freddy Barker

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344
Could you use these debug versions of musicbee and the media control plugin:

https://www.mediafire.com/file/yuxjkrd0mnnbdz9/MusicBeeDebugMediaKey.zip/file
https://www.mediafire.com/file/nawzazb3ialq9va/mb_MediaControlDebugPlugin.zip/file

All you need to do is press the multimedia play button on the keyboard once
and then send me the info at the end of the error log

Freddy Barker

  • Sr. Member
  • ****
  • Posts: 751
  • 🎧 MB 3.4.7628P
Could you use these debug versions of musicbee and the media control plugin:

https://www.mediafire.com/file/yuxjkrd0mnnbdz9/MusicBeeDebugMediaKey.zip/file
https://www.mediafire.com/file/nawzazb3ialq9va/mb_MediaControlDebugPlugin.zip/file

All you need to do is press the multimedia play button on the keyboard once
and then send me the info at the end of the error log

Code
30/08/2019 12:52:29 - media key detected=MediaPlayPause
Regards: Freddy
Last Edit: August 30, 2019, 02:45:37 PM by Freddy Barker

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344
@Freddy, I dont think you are having the issue reported by others. But could you do one more thing - could you click the play/pause button on the media control just once and check the error log for new information

Freddy Barker

  • Sr. Member
  • ****
  • Posts: 751
  • 🎧 MB 3.4.7628P
@Freddy, I dont think you are having the issue reported by others. But could you do one more thing - could you click the play/pause button on the media control just once and check the error log for new information

More than happy to do any amount of MB testing, lots of free time when retired!!
(Had to press Volume Up key before Media Control Window Pops up)..
Code
31/08/2019 09:47:41 - media button pressed: Play,MB playstate=Paused,control state=Paused
Regards: Freddy

AinselLee

  • Newbie
  • *
  • Posts: 6
I just wanted to say that the controls on headphones don't seem to do the same thing as controls on a keyboard as for me, I currently only get the double clicking effect with my headphones and not my keyboard buttons.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
3.3.7175 is a weird build.

The bug in this thread returned (I also updated the add-in), and occasionally elements from one custom tab 'follow' me to the next tab and are still interactive as if the handles weren't killed.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344

waste

  • Newbie
  • *
  • Posts: 6
Code
9/6/2019 8:25:31 AM - media button pressed: Play,MB playstate=Paused,control state=Paused
9/6/2019 8:25:31 AM - media key detected=MediaPlayPause

When I pressed the media key on the keyboard the selected song started and stopped immediately.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344
So it looks like windows now triggers the button pressed event even though no button was actually pressed. And MB detects the actual key press so effectively receives 2 key presses.

I am not sure what i will do about it for now but you could either:
disable the hotkey "MultiMedia: Play/Pause" in MusicBee
or edit the code in the plugin to comment out the button press code

waste

  • Newbie
  • *
  • Posts: 6
Not sure if this issue is related or not however when I disable the hotkeys I have to play a song manually inside of MusicBee before the media keys on the keyboard work. The functionality of the plugin isn't initialized until a song plays for the first time or something along those lines.

I have also tired your second solution however that prevents the buttons in the overlay from working.

Thank you for taking your time to look at this problem.

Also while trying to figure this out myself I ran across a similar plugin for foobar2k its approach to a similar problem is to passthrough the keyboard messages, not sure if this will be helpful to you at all but here is a link to the plugin source code https://github.com/Hual/foo_mediacontrol/blob/master/foobar2000/foo_mediacontrol/message_listener.cpp.

kid

  • Newbie
  • *
  • Posts: 10
Not sure if this issue is related or not however when I disable the hotkeys I have to play a song manually inside of MusicBee before the media keys on the keyboard work. The functionality of the plugin isn't initialized until a song plays for the first time or something along those lines.

I think that is how the media control overlay is supposed to function. It uses an audio stream to recognize the source of the media, and then establishes a handshake with the application sending it to control the media stream. If no handshake is made there is no media control (like with MusicBee without the plugin). This prevents it from getting confused when you have multiple media applications opened, and selects the one that is outputting media. It gets unreliable when there are multiple audio streams (e.g. music player in the background and a youtube video autoplaying, it will switch over to the "newest" handshake and control the video).

Quote
I have also tired your second solution however that prevents the buttons in the overlay from working.

Thank you for taking your time to look at this problem.

Also while trying to figure this out myself I ran across a similar plugin for foobar2k its approach to a similar problem is to passthrough the keyboard messages, not sure if this will be helpful to you at all but here is a link to the plugin source code https://github.com/Hual/foo_mediacontrol/blob/master/foobar2000/foo_mediacontrol/message_listener.cpp.

The foobar2k implementation sounds like maybe the lesser of two evils, als long as the windows 10 media control overlay is as unreliable as I described, I'd rather have the current implementation where MB takes the keystrokes "straight from the source".