2

I was searching for what that sound and media tool (The panel which name I could not find) is governed by, so that I can set, what apps have access to it. Specifically, I would like to know, how to do two things:

1) Give access to Windows Media Player (chrome, spotify or VLC work fine)

2) Set it so, that when I hit the "play/pause" button on my keyboard, it will either stop everything or start playing the active media. Now it sometimes stops one media and starts another, when Windows Media Player is open

I suppose the solution of 2) will be closely related to 1)

I run on Win 10 on HP Gaming Pavilion - 15-cx0017nc

Thank you for any references and help.

Sairaight
  • 21
  • 1
  • 2
  • Media buttons on keyboards aren't controlled by a utility usually, unless the manufacturer has produced their own utility for handling this. Extra features may vary based on the media player and its support for additional hot keys. – music2myear Nov 10 '19 at 02:51
  • 1
    That media control panel is part of Windows. I expect it to be handled by explorer.exe when you are logged in and by something special when you are in the lock screen. On Windows 10(?) (or, at least, Windows 8), that will always appear when you use media buttons to change the volume. I make it appear by using my keyboard’s volume buttons. On Windows 11, this appears in Quick Settings which you can load with Windows+A. The prioritization of apps is something I don’t know about, normally the first program to start playing media when nothing else is playing media seems to grab that. – binki Jun 18 '22 at 17:41
  • I also would like to know what this app is. Specifically I want to tell it to ignore Teams. Every time I received a Teams call this app hijacks the media play/pause button, which means that I can't pause my music before answering the call. – J Dor Dec 19 '22 at 14:27

1 Answers1

0

So.. First of all (directly from the source code of one of the programs designed to hide it) the SMTC controls* pop-up is a NativeHWNDHost and/or DirectUIHWND child window of explorer.exe (presumably from dui70.dll) You can also verify this with WinSpy++.

I don't think there's any built-in mechanism to deal with its interaction with specific applications, AFAIU the thing just works with a pool that receives events from all the system and that's it (of course you can always use/code a program that hijacks these calls but I guess this is a story for another time). Just like I'm skeptical this could be a WMP problem, given that it's a first-party program (maybe some older version of the other programs you mentioned were bugged like here? Or perhaps OEM bloatware could be the culprit?)

You can actually do something with 2), though. Putting aside that most applications should allow you to toggle their media keys integration in their settings, you could remap your hotkeys to a different action. This can be done either "globally" at the keyboard level or just specifically to Explorer (the secret is using the ShellExecute override to run SendKeys, VBScript or AHK).

*and yes, I understand this is akin to an "ATM machine" situation, but so Microsoft refers to it.

mirh
  • 1,055