Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Media Sessions are not updating in Windows 10 2004 #29

Closed
ShankarBUS opened this issue Sep 2, 2020 · 58 comments · Fixed by #369
Closed

Bug: Media Sessions are not updating in Windows 10 2004 #29

ShankarBUS opened this issue Sep 2, 2020 · 58 comments · Fixed by #369
Assignees
Labels
Bug Something isn't working Community Feedback Wanted Fixed Has been fixed. High Priority

Comments

@ShankarBUS
Copy link
Member

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 ADeltaX/AudioFlyout#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.

@ShankarBUS ShankarBUS added Bug Something isn't working Enhancement New feature or request Help Wanted Extra attention is needed Known issue Known Bug labels Sep 2, 2020
@ShankarBUS ShankarBUS pinned this issue Sep 2, 2020
@ADeltaX
Copy link
Member

ADeltaX commented Sep 2, 2020

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.)

@ShankarBUS
Copy link
Member Author

ShankarBUS commented Sep 2, 2020

Mm okay. 😑

HOW TF DO YOU KNOW IT? 🤯😵

Are only the sessions changed not firing? Are there some other events not firing too (for e.g. playback info changed, timeline properties changed & etc)?

@ADeltaX
Copy link
Member

ADeltaX commented Sep 2, 2020

HOW TF DO YOU KNOW IT? 🤯😵

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)

Are only the sessions changed not firing? Are there some other events not firing too (for e.g. playback info changed, timeline properties changed & etc)?

So far I only observed sessions changes not firing.

Can we do some thing to update it in a programmatic way like by using the INowPlayingSessionManager somehow?

The problem of this interface is that is different across Windows 10 versions.

@ADeltaX
Copy link
Member

ADeltaX commented Sep 2, 2020

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)

@prakharb5
Copy link
Member

Any news, when it will be fixed?

@Samuel12321 Samuel12321 removed the Enhancement New feature or request label Sep 21, 2020
@Daksh-T
Copy link

Daksh-T commented Oct 6, 2020

Any news of when this will be fixed?

@ShankarBUS
Copy link
Member Author

No updates yet 😅. But this is a high priority and will sure be fixed

@Samuel12321
Copy link
Member

Microsoft seems to have fixed this on insider builds

@Samuel12321 Samuel12321 added Community Feedback Wanted and removed Known issue Known Bug Help Wanted Extra attention is needed labels Oct 31, 2020
@Samuel12321
Copy link
Member

Can the community verify this.

@ShankarBUS
Copy link
Member Author

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 😏.

@parthmawai
Copy link

any updates?

@ShankarBUS
Copy link
Member Author

Well @ADeltaX just fixed a few bugs. We expect to release feature with v0.9 within 2 weeks 😄

@ShankarBUS
Copy link
Member Author

It's happening! v0.9 will be released in 2 days or so.

@iqfareez
Copy link

Excited to see its coming

@ShankarBUS ShankarBUS mentioned this issue Jan 18, 2021
@prakharb5 prakharb5 added the Fixed Has been fixed. label Jan 19, 2021
@parthmawai
Copy link

parthmawai commented Jan 22, 2021

@Cyberdroid1 when will v0.9 be released ?

@prakharb5
Copy link
Member

It should come soon.
@Samuel12321 any updates?

@prakharb5
Copy link
Member

@Parth-Mawai,
v0.9 is out!

You can get the app from the GitHub Repo, or you can wait a few days until it is released in store.

@ghost
Copy link

ghost commented Jan 23, 2021

I can't install, it says that app doesn't have needed certificates, even after installing *.cer file ://

@parthmawai
Copy link

I can't install, it says that app doesn't have needed certificates, even after installing *.cer file ://

same here

@parthmawai
Copy link

parthmawai commented Jan 23, 2021

image

the error : "This app package is not signed with a trusted certificate. Contact your system administrator or the app developer to obtain a new certificate or app package with trusted certificates. The root certificate and all immediate certificates of the signature in the app package must be trusted (0x800B010A)"
@Cyberdroid1

@prakharb5
Copy link
Member

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 😂

@ghost
Copy link

ghost commented Jan 23, 2021

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

@KibSquib48
Copy link

is it possible to maybe add an option to restart ModernFlyouts from the system tray context menu?

@prakharb5
Copy link
Member

There is ability to exit app, and then start it from Start menu.

IMO, adding an option to restart isn't exactly great.

@KibSquib48
Copy link

There is ability to exit app, and then start it from Start menu.

IMO, adding an option to restart isn't exactly great.

true but it's kind of annoying to have to close modernflyouts and open it from the start menu over and over again basically every hour, a button to restart it would still be nice and make it less of a hassle

@prakharb5 prakharb5 unpinned this issue Jan 26, 2021
@prakharb5
Copy link
Member

Why do you need to restart the app every hour though?

@KibSquib48
Copy link

because it happens almost every hour?

@ghost
Copy link

ghost commented Jan 5, 2022

I encountered this bug today. Kinda a dealbreaker.

@dsz-dsz-k
Copy link

Sorry for digging up this issue.
Actually I tried to develop my own app using GlobalSystemMediaTransportControlsSessionManager, and debugging brought me to this page.
I installed ModernFlyout, and it seems that the bug is still present in later Windows 10 versions (mine is latest 21H1).
Events like SessionsChanged or CurrentSessionChanged are never fired.
It seems that stock Windows 10 flyout are updated but at a very slow frequency.
Any hint about the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Community Feedback Wanted Fixed Has been fixed. High Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants