Open
Conversation
martpie
reviewed
Mar 17, 2026
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.
Summary
navigator.mediaSessionMPRIS integration with a native Rust implementation using thempris-servercratemuseeksinplayerctl -linstead oforg.webkit.app-<hash>.Sandboxed.instance-<N><audio>element to prevent WebKitGTK's MPRIS entry from reporting active playback statusnavigator.mediaSessionMPRIS features supported
Changes
Backend (Rust)
src-tauri/src/plugins/mpris.rs— Native MPRIS server plugin usingmpris-servercrate with bidirectional IPCsrc-tauri/src/plugins/stream_server.rs— Added CORS header for Web Audio APIfetch()compatibilitysrc-tauri/src/libs/events.rs— AddedPlaybackSeekTo,PlaybackSeekBy,PlaybackSetVolume,PlaybackSetShuffle,PlaybackSetRepeatIPC eventsFrontend (TypeScript)
src/lib/bridge-mpris.ts— IPC bridge for MPRIS commands (no-op on non-Linux)src/lib/web-audio-element.ts— Drop-inHTMLAudioElementreplacement usingAudioContextso WebKitGTK's MPRISentry stays inactive
src/lib/player.ts— UsesWebAudioElementon Linux, syncs state to native MPRIS, addssetShuffle/setRepeatmethodssrc/lib/utils-player.ts— Extracted shared volume smoothing helperssrc/components/VolumeControl.tsx— Uses shared volume smoothing helperssrc/components/IPCPlayerEvents.tsx— Handles new MPRIS-originated events (seek, volume, shuffle, repeat)Test plan
playerctl -lshowsmuseeks(theorg.webkit.app-...entry may exist but stays in Stopped status)playerctl metadatashows title, artist, album, artUrl, lengthplayerctl play,pause,play-pause,next,previous,stopplayerctl shuffle On/Offplayerctl loop None/Track/Playlistplayerctl volume 0.5sets the UI slider to 50%playerctl position 30(absolute) andplayerctl position 10+(relative)