Bump to 1.2.0, using newest dependencies
This commit is contained in:
parent
1c9e32671e
commit
f499d730e8
10
Cargo.toml
10
Cargo.toml
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mpvipc"
|
name = "mpvipc"
|
||||||
version = "1.1.9"
|
version = "1.2.0"
|
||||||
authors = ["Jonas Frei <freijon@pm.me>"]
|
authors = ["Jonas Frei <freijon@pm.me>"]
|
||||||
description = "A small library which provides bindings to control existing mpv instances through sockets."
|
description = "A small library which provides bindings to control existing mpv instances through sockets."
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
@ -10,9 +10,9 @@ documentation = "https://docs.rs/mpvipc/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = "1.0.1"
|
serde = "1.0.138"
|
||||||
serde_json = "1.0.0"
|
serde_json = "1.0.82"
|
||||||
log = "0.4.6"
|
log = "0.4.17"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
env_logger = "0.6.1"
|
env_logger = "0.9.0"
|
||||||
|
10
README.md
10
README.md
@ -4,7 +4,7 @@ A small library which provides bindings to control existing mpv instances throug
|
|||||||
|
|
||||||
To make use of this library, please make sure mpv is started with the following option:
|
To make use of this library, please make sure mpv is started with the following option:
|
||||||
`
|
`
|
||||||
$ mpv --input-ipc-server=/tmp/mpvsocket --idle ...
|
$ mpv --input-ipc-server=/tmp/mpv.sock --idle ...
|
||||||
`
|
`
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
@ -22,19 +22,19 @@ You can use this package with cargo.
|
|||||||
|
|
||||||
Make sure mpv is started with the following option:
|
Make sure mpv is started with the following option:
|
||||||
`
|
`
|
||||||
$ mpv --input-ipc-server=/tmp/mpvsocket --idle
|
$ mpv --input-ipc-server=/tmp/mpv.sock --idle
|
||||||
`
|
`
|
||||||
|
|
||||||
Here is a small code example which connects to the socket /tmp/mpvsocket and toggles playback.
|
Here is a small code example which connects to the socket /tmp/mpv.sock and toggles playback.
|
||||||
|
|
||||||
```
|
```rust
|
||||||
extern crate mpvipc;
|
extern crate mpvipc;
|
||||||
|
|
||||||
use mpvipc::*;
|
use mpvipc::*;
|
||||||
use std::sync::mpsc::channel;
|
use std::sync::mpsc::channel;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
let mpv = Mpv::connect("/tmp/mpv.sock").unwrap();
|
||||||
let paused: bool = mpv.get_property("pause").unwrap();
|
let paused: bool = mpv.get_property("pause").unwrap();
|
||||||
mpv.set_property("pause", !paused).expect("Error pausing");
|
mpv.set_property("pause", !paused).expect("Error pausing");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user