audio: Mpris media control fixes
The panel buttons for next/previous didn't do anything since `on_press` wasn't set. Now they work. Fixed `autosize` which I had accidentally committed after using it for testing. (It would be good to figure out why the applets don't work properly with autosize when run outside of the panel, since that's handy for testing.) I noticed with VLC, skipping a track makes the media controls disappear very briefly, and sometimes the pause button didn't return. I guess `can_play` (etc.) are temporarily set to false, probably expecting the controls to be greyed out and not hidden from a panel. Anyway, monitoring for changes to these properties as well will hopefully fix the part where it could remain missing. Though I can't reproduce that consistently.
This commit is contained in:
parent
32b7012b79
commit
216d88e977
3 changed files with 31 additions and 13 deletions
|
|
@ -19,8 +19,6 @@ use libpulse_binding::{
|
|||
volume::ChannelVolumes,
|
||||
};
|
||||
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use tokio::sync::{mpsc, Mutex};
|
||||
|
||||
pub static FROM_PULSE: Lazy<Mutex<Option<(mpsc::Receiver<Message>, mpsc::Sender<Message>)>>> =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue