mirror of
https://git.srhtnin.garden/sarah/SaraTune.git
synced 2026-10-15 02:23:17 +02:00
Media controls (MPRIS, Windows SMTC); stop old tracks when switching
This commit is contained in:
1 parent
e2d7515e08
commit
d7f5eba1c2
14 files changed
+799
-26
No files matched your search
@@ -14,6 +14,22 @@ A music player with two modes, switched in the header:
|
||||
Each mode has its own player, so switching modes doesn't lose your place; starting one pauses
|
||||
the other.
|
||||
|
||||
## Media controls
|
||||
|
||||
SaraTune counts as a media player to the system, so the desktop's media widget, the lock screen
|
||||
and media keys (keyboard or Bluetooth headphones) show and control whatever played last, in
|
||||
either mode: play/pause, next/previous, seeking, volume, and shuffle/repeat (in Audio mode, repeat
|
||||
is the loop button; there's no shuffle).
|
||||
|
||||
- Linux: MPRIS on the session bus as `org.mpris.MediaPlayer2.SaraTune` (`Mpris.py`, with
|
||||
`dbus-fast`). Try it with `playerctl -p SaraTune status`.
|
||||
- Windows: the System Media Transport Controls (`Smtc.py`, with the `winrt` packages), through a
|
||||
WinRT MediaPlayer whose own command handling is off, since the window belongs to the Flet
|
||||
client's process. Not tested on real Windows yet.
|
||||
|
||||
`MediaControls.py` is the shared part. Settings > General can turn it off; if it can't start
|
||||
(no session bus, no WinRT), SaraTune plays without it.
|
||||
|
||||
## Where things live
|
||||
|
||||
| Path | What |
|
||||
|
||||
Reference in new issue
Block a user