-
-
Notifications
You must be signed in to change notification settings - Fork 290
enable mediaSession api #1040
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
enable mediaSession api #1040
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This should also close #649 when implemented |
|
This will have to be handled platform specific as enabling this outright will conflict with MPRIS on Linux at least. Don't know about Mac. That aside there is probably a reason why Leaving the line in the file as a comment also serves no purpose. If you just want to keep it for reference as how it used to be, that is what Git is for. If you're going to remove a line, remove it completely. |
|
This was discussed in the Discord (/matrix bridge). |
One simple approach would be to enable it only on Windows via a process.platform check. Alternatively, we could make this configurable for users who want navigator.mediaSession integration, while keeping it off by default on platforms where conflicts are known or unverified. |
|
I would prefer you add a toggle in the settings to Enable/Disable this feature, as there are some (including myself) that wouldn't want this enabled. Toggling the setting should prompt the user to restart the app (similar to some other settings) since it's configured within the electron main process. |
This PR enables the navigator.mediaSession api so windows will display information about the current song next to the volume bar.
What changed:
HardwareMediaKeyHandling, MediaSessionService features are not disabled anymore to make the mediaSession api work.
I plan to implement more events for the mediaSession api like next previous.
But I am not sure what the reason was to disable those 2 features. Maybe there is a good reason for it and enabling it would break stuff. In that case I would look into it, on how it could be resolved since the mediaSession is a nice to have Feature.