ModernFlyouts: Bug: Media Sessions are not updating in Windows 10 2004
Description of the bug :
Starting from Windows 10 2004 the GlobalSystemMediaTransportControlsSessionManager is broken and the GlobalSystemMediaTransportControlsSessionManager.SessionsChanged
event is not firing properly.
Meaning that the session controls won’t be upated whenever an app opens/closes (e.g. Test yourself with Groove Music) & etc. This makes the session controls (which is a very important feature of this app) useless. But the built-in flyout works somehow.
Source : Manual verification and from our collaborator @ADeltaX (in https://github.com/ADeltaX/AudioFlyout/issues/12)
Also I heard that GSMTC as WinRT api is broken in 19041.x (doesn’t get notified when an app closes SMTC (e.g. when you close Groove Music))
Current Workaround :
Restarting the app updates the sessions (won’t update again we have to restart again to update).
Expected behaviour :
The app updates itself whenever the GSMTC sessions are updated.
Proposed method :
If can’t provide any programmatic fix, at-least provide an update button to refresh them manually. Instead of forcing users to restart the app and making things complex.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 58 (29 by maintainers)
I got a happy new for us!
Yeah!!! Thank you so much @ADeltaX for helping us.
Our delta boi found & successfully reversed the
INowPlayingSessionManager
.This new API is 🔥🔥🔥🔥.
It give us the HWND and Process Id of the media source. F*** even a method to activate the source app!
I hope this would also enable us to find and activate the source with high precision (unlike the current guess and pick one method).
I still haven’t seen the full potential of it. All I have is just the metadata. But if this turns out successfully, our app would be a robust alternative to the legacy one.
We could get an insight of it within a few days.
Magic! (You have no idea how many interfaces I damn reversed. This is one of 2 reason why I’m still quiet yet. I want to make a big surprise. The another one is being a university student with many exams lol)
So far I only observed sessions changes not firing.
The problem of this interface is that is different across Windows 10 versions.
It’s happening! v0.9 will be released in 2 days or so.
Microsoft seems to have fixed this on insider builds
If Cs/WinRT was stable enough we would use that compiler/marshaller to create a projection of MtcModel -> as you can have support up to 14393. (LockScreen uses this btw)
Media sessions are not updating still… Spotify steering works, but microsoft edge and other apps no 😕// But displaying over everything works ;D
Edit: if anyone have same problem, just reset app, and everything works xD
Wee woo wee woo!
Feature update time!
NPSM is in prototyping stage right now.
https://github.com/ADeltaX/NPSMLib
The actual incorporation would happen in a few days.
Stay tuned for more updates 😏.
Well @ADeltaX just fixed a few bugs. We expect to release feature with v0.9 within 2 weeks 😄
Not unless Discord suddenly decides to just randomly support serving more information for media sessions on their own will.
Hmm, I know this issue, in version 20h2 still appears, but the best way to repair it is to uninstall any last windows update (it will work now) and (optionally) install it again 😉 the bug can unfortunately appears again with small chance, can be repaired using the same method (I comment it because of ‘community feedback wanted’) 😁 And it appears not only in this app, in build-in media control too (I think you know it 😉)
No updates yet 😅. But this is a high priority and will sure be fixed
@ADeltaX are you able to verify if this has been resolved?
Any news, when it will be fixed?
The built-in flyout uses the very old INowPlayingSessionManager com interface.
I haven’t tested MtcModel (starting from 14393) enough to say if it’s broken or not, but at current situation it will NOT work on .NET due to WinRT marshaller being picky to say the least (If the namespace starts with “Windows.” the .NET WinRT marshaller will look for the winmd ONLY in “%windir%\system32\winmetadata”. Obviously this is an internal one, so not available in that folder. Failing to find it will die.)
because it happens almost every hour?
To fix that, open the certificate, then install, then choose browse and select trusted people. And install.
Then try installing again. Should work. I just figured out today 😂
i thought maybe the new API could have helped in this.
you mean you can’t do anything about it, right? ok if you say so
I can think of a couple reasons to deny this request…
You’ll likely be denied immediately. Discord won’t accept requests for features like this, development has also slowed down for Discord, until next year.
Isn’t that like Discord’s fault?
What else can we do?
I broke my Windows Update, so can’t say… 😅 😂
Can the community verify this.