Merge branch 'use-cycle-for-toggle' into 'master'
Use `cycle` command for toggling play/pause See merge request mpv-ipc/mpvipc!5
This commit is contained in:
commit
f591765e34
|
@ -704,9 +704,6 @@ impl Mpv {
|
|||
}
|
||||
|
||||
pub fn toggle(&self) -> Result<(), Error> {
|
||||
match get_mpv_property::<bool>(self, "pause") {
|
||||
Ok(paused) => set_mpv_property(self, "pause", !paused),
|
||||
Err(msg) => Err(msg),
|
||||
}
|
||||
run_mpv_command(self, "cycle", &["pause"])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue