A Rust library for discovering and controlling AirPlay devices.
Add this to your Cargo.toml
:
[dependencies]
airplay = "0.1"
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());
}
}
MIT
- 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