5 releases
Uses old Rust 2015
0.1.4 | Feb 20, 2020 |
---|---|
0.1.3 | Jun 11, 2019 |
0.1.2 | Jan 20, 2018 |
0.1.1 | Dec 10, 2017 |
0.1.0 | Dec 10, 2017 |
#498 in Audio
46 downloads per month
30KB
628 lines
sonos.rs
sonos.rs is a Sonos controller library written in Rust. Currently it only supports playback operations (play, pause, stop, skip, add track to queue, remove track from queue) with no support for search operations as of yet.
Example:
extern crate sonos;
let devices = sonos::discover().unwrap();
let bedroom = devices.iter()
.find(|d| d.name == "Bedroom")
.expect("Couldn't find bedroom");
let track = bedroom.track().unwrap();
let volume = bedroom.volume().unwrap();
bedroom.play();
println!("Now playing {} - {} at {}% volume.", track.title, track.artist, volume);
Dependencies
~10–16MB
~331K SLoC