airplay-rs
A Rust library for discovering and controlling AirPlay devices.
Usage
Add this to your Cargo.toml
:
[dependencies]
airplay = "0.1"
Example
use airplay::discovery::{discover, AIR_PLAY_SERVICE_NAME, AIR_TUNES_SERVICE_NAME};
use futures_util::StreamExt;
#[tokio::main]
async fn main() {
let devices = discover(AIR_PLAY_SERVICE_NAME);
tokio::pin!(devices);
while let Some(device) = devices.next().await {
println!("Found device: {}", device.get_fullname());
}
}
License
MIT
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request