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:
Jonas Frei 2023-07-31 05:21:32 +00:00
commit f591765e34
1 changed files with 1 additions and 4 deletions

View File

@ -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"])
}
}