Repository navigation
Conversation
Zuno already publishes playback over MPRIS, but not its volume, so desktop media widgets could neither show nor change it. On KDE Plasma, for example, the mouse wheel over the media player tray icon did nothing for Zuno. The Linux session now handles MPRIS volume both ways. A change made from the desktop is sent to the app, and the app's volume is mirrored back from the `player-volume-sync` event it already emits on every change (the one the mini player follows). The published level therefore always comes from the app itself, and an in-app change reaches the desktop right away rather than on the next once-a-second position update.
|
@zebus3d is attempting to deploy a commit to the Faizan Asad's projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Zuno publishes playback over MPRIS but never its volume, so desktop media widgets can neither show nor change it. As #139 describes,
Volumealways reads1and setting it does nothing. On KDE Plasma, for example, scrolling over the Media Player tray icon or moving its volume slider has no effect on Zuno.This adds volume to the Linux MPRIS session in both directions:
SetVolumefrom MPRIS is forwarded to the frontend as a newsetVolumeaction on the existinglinux-media-controlevent, and applied withcontroller.setVolume.player-volume-sync, the event the main window already emits on every volume or mute change (the one the mini player follows), and publishes it with souvlaki'sset_volume. Mute is published as0.The published level always comes from the app itself: a change made from the desktop goes to the app first and comes back through
player-volume-sync. This also gives MPRIS the confirmation it expects, so the desktop's slider does not snap back. The last value is kept even before the MPRIS session exists, so the session starts at the right level.Closes #139
How it was checked
npm run verifypassescargo testpassesbusctlsteps from Linux: MPRIS volume control does not change Zuno's actual audio volume #139:set-property … Volume d 0.3changes Zuno's volume, andget-propertyreads the new value back.Notes for the reviewer
Linux only; Windows and macOS are untouched. It reuses the existing
player-volume-syncevent instead of adding a volume field to the once-a-second media update, so in-app changes reach the desktop right away and there is no stale value racing a fresh one.