README: small fixups, add fork notice
This commit is contained in:
parent
bb050d7a6d
commit
9e0d8c0117
13
README.md
13
README.md
|
@ -3,14 +3,17 @@
|
||||||
|
|
||||||
# mpvipc
|
# mpvipc
|
||||||
|
|
||||||
|
> **NOTE:** This is a fork of [gitlab.com/mpv-ipc/mpvipc](https://gitlab.com/mpv-ipc/mpvipc), which introduces a lot of changes to be able to use the library asynchronously with [tokio](https://github.com/tokio-rs/tokio).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
A small library which provides bindings to control existing mpv instances through sockets.
|
A small library which provides bindings to control existing mpv instances through sockets.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
- `mpv`
|
- `mpv` (runtime dependency)
|
||||||
- `cargo` (make dependency)
|
- `cargo-nextest` (optional test depencency)
|
||||||
- `cargo-nextest` (test depencency)
|
- `grcov` (optional test depencency)
|
||||||
- `grcov` (test depencency)
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
@ -29,6 +32,6 @@ use mpvipc::*;
|
||||||
async fn main() -> Result<(), MpvError> {
|
async fn main() -> Result<(), MpvError> {
|
||||||
let mpv = Mpv::connect("/tmp/mpv.sock").await?;
|
let mpv = Mpv::connect("/tmp/mpv.sock").await?;
|
||||||
let paused: bool = mpv.get_property("pause").await?;
|
let paused: bool = mpv.get_property("pause").await?;
|
||||||
mpv.set_property("pause", !paused).expect("Error pausing");
|
mpv.set_property("pause", !paused).await.expect("Error pausing");
|
||||||
}
|
}
|
||||||
```
|
```
|
Loading…
Reference in New Issue