简体   繁体   中英

AirPlay API for Mac OS X

Is there currently any API (public or private) that will allow a 3rd party Mac OS X application to stream audio to AirPlay receivers? Airfoil by Rogue Amoeba Software seems to be able to do this, same goes for Erica Sadun's AirFlick , but I was unable to find any source code that would demonstrate how to do this. Any pointers are appreciated!

It turns out AirPlay audio streaming is possible as of OS X 10.8 using public APIs, but wasn't really documented anywhere. Joris Kluivers wrote a great blog post on how to get it going.

Here is an open source ruby implementation. It's pretty straight forward. https://github.com/elcuervo/airplay

There are a couple of open-source RAOP players available; I haven't tried them, so I don't know if Apple has broken them since they were written.

Mountain Lion (OS X 10.8) has added AirPlay support in the sound settings. The user can choose to send the local sound output to an AirPlay device. However, I don't think that you have access to any API within your app.

There are some libraries available to implement AirPlay, but know that Apple will reject your app if you try to publish it on the App Store. At least, that's what happened to me.

I wrote a node.js module to support AirPlay. Even if you don't use node, you can just pipe your audio data through stdin.

https://github.com/lperrin/node_airtunes/

I don't think it's available. At least not in versions prior to 10.7.

I'm guessing that Airfoil uses something like DVD John did a while ago when he cracked the Airport Express key payload. He released the code (C#) you should be able to find it but it's pretty cryptic.

I'm not aware of what AirFlick uses but you could always try pinging Erica, she usually shares her stuff.

Someone recently managed to obtain the AirPlay private key which allows you to have your program listed in the AirPlay menus on devices on your network.

You can read about it here. There is also an open source project linked from that page. http://mafipulation.org/blagoblig/2011/04/08#shairport

Be aware that obviously any application you create will never be approved by apple and the private key could potentially be changed in a firmware/software update.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM