Engineering:AirPlay

From HandWiki
Revision as of 12:08, 4 February 2024 by Steve2012 (talk | contribs) (correction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Proprietary wireless streaming protocol developed by Apple Inc.
AirPlay
AirPlay 2 logo.svg
Logos of AirPlay 2
AirPlay video (left) and AirPlay audio (right)
DeveloperApple Inc.
TypeWireless media streaming
Release date
  • June 7, 2004 (as AirTunes)[1]
  • September 1, 2010 (AirPlay)
  • November 22, 2010 (for iOS)
  • June 6, 2011 (mirroring)
  • May 29, 2018 (AirPlay 2)
Websiteapple.com/airplay

AirPlay is a proprietary wireless communication protocol stack/suite developed by Apple Inc. that allows streaming between devices of audio, video, device screens, and photos, together with related metadata. Originally implemented only in Apple's software and devices, it was called AirTunes and used for audio only.[2] Apple has since licensed the AirPlay protocol stack as a third-party software component technology to manufacturers that build products compatible with Apple's devices.

History

In 2004, Apple introduced AirTunes as a new feature of iTunes 4.6. It allowed music streaming over a network to an AirPort Express, which was equipped with a 3.5 mm analog-digital audio jack for speakers or other audio devices. In 2010, Apple introduced a new iteration of the AirTunes technology, now called AirPlay, as part of iOS 4.2. It supported audio and now video streaming to the Apple TV, and later added screen-mirroring and eventually support for a broad range of 3rd-party AirPlay-compatible speakers and AV equipment.

Apple announced AirPlay 2 at its annual WWDC conference on June 5, 2017. It was scheduled for release along with iOS 11 in the third quarter of 2017, but was delayed until June 2018.[3][4] Compared to the original version, AirPlay 2 improves buffering; adds streaming audio to stereo speakers;[5] allows audio to be sent to multiple devices in different rooms;[6] and control by Control Center, the Home app, or Siri,[7] functionality that was only available previously using iTunes under macOS or Windows.[8]

History of AirPlay
2004 Launch as AirTunes for iTunes and AirPort Express
2010 Launch on iOS 4 as AirPlay
2018 AirPlay 2 launch on iOS 11.4
2021 macOS Monterey (12) includes receiver capability on compatible Macs

Senders

AirPlay sender devices include computers running iTunes, and iOS devices such as iPhones, iPods, and iPads running iOS 4.2 or greater, and devices can send AirPlay over Wi-Fi or ethernet. OS X Mountain Lion supports display mirroring via AirPlay on systems containing 2nd generation Intel Core processors or later.[9]

In 2016, HTC released the "10", also known as "One M10", an Android phone with Apple AirPlay streaming.[10]

As of iOS 4.3, third-party apps like ApowerMirror,[11] AirServer, and Reflector may send compatible audio and video streams over AirPlay.[12] The iTunes Remote app on iOS can be used to control media playback and select AirPlay streaming receivers for iTunes running on a Mac or PC.[13]

As of macOS 10.14, there is no public API for third-party developers to integrate AirPlay 2 into their macOS apps. However, there are third-party streamers such as Airfoil. In May 2019, a third-party developer released a macOS app that can stream audio using AirPlay 2.[14] The app includes a helper tool called "AirPlay Enabler" that uses code injection to bypass restrictions to the AirPlay 2 private API on macOS.[15]

Receivers

AirPlay receiver devices include Apple TV, HomePod, third-party speakers and the discontinued AirPort Express, which included a combined analog and optical S/PDIF audio output connector. Compatible devices can receive AirPlay over wi-fi or ethernet. Some open-source projects have reverse-engineered the audio part of the protocol, enabling any computer to be turned into an AirPlay receiver for audio.[16]

However, because not all third-party receivers implement Apple's DRM encryption, some media, such as iTunes Store's own rights-protected music (Apple's own "FairPlay" encryption), YouTube, and Netflix, cannot stream to those devices or software. On Apple TV, starting with firmware 6.0, the DRM scheme is enforced: devices without it cannot be used.[17]

AirPlay wireless technology is integrated into speaker docks, AV receivers, and stereo systems from companies such as Naim, Bose, Yamaha, Philips, Marantz, Onkyo, Bowers & Wilkins, Pioneer, Sony, Sonos, McIntosh, Denon,[18] and Bang & Olufsen.[19] Song titles, artists, album names, elapsed and remaining time, and album artwork can appear on AirPlay-enabled speakers with graphical displays. Often these receivers are built to only support the audio component of AirPlay, much like AirTunes.

Bluetooth devices (headsets, speakers) that support the A2DP profile also appear as AirPlay receivers when paired with an iOS device, although Bluetooth is a device-to-device protocol that does not rely on a wireless network access point.

During the January 2019 Consumer Electronics Show (CES) in Las Vegas, television makers Samsung, LG, Vizio, and Sony announced they would be producing sets with built-in AirPlay 2 receiving capability.[20] LG announced that television models that are AirPlay 2-enabled will include the 2019 OLED, NanoCell SM9X, UHD UM7X, and LG NanoCell SM8X models.[21]

In September 2020, Roku added AirPlay 2 support as part of the 9.4 update on select 4K Roku devices. In April 2021, the 10.0 update added support for more Roku TVs and Players.[22]

During WWDC 2021, Apple announced that macOS Monterey would include AirPlay receiver compatibility for compatible Macs.

Protocols

AirPlay and AirTunes work over a local network, through either Wi-Fi or Ethernet. Originally, devices had to be connected to the same network, but since late 2017 devices can opt to use Wi-Fi Direct allowing devices to connect without a LAN.[23]

The AirTunes part of the AirPlay protocol stack uses UDP for streaming audio and is based on the Real Time Streaming Protocol.[24] The streams are transcoded using the Apple Lossless codec with 44100 Hz and 2 channels symmetrically encrypted with AES, requiring the receiver to have access to the appropriate key to decrypt the streams.[25] The stream is buffered for approximately 2 seconds before playback begins, resulting in a small delay before audio is output after starting an AirPlay stream.[26]

The protocol supports metadata packets that determine the final output volume on the receiving end. This makes it possible to always send audio data unprocessed at its original full volume, preventing sound quality deterioration due to reduction in bit depth and thus sound quality which would otherwise occur if changes in volume were made to the source stream before transmitting. It also makes possible the streaming of one source to multiple targets each with its own volume control, and for volume adjustments to be applied instantly, instead of being delayed by the 2 second buffer period. The AirPort Express' streaming media capabilities use Apple's Remote Audio Output Protocol (RAOP), a proprietary variant of RTSP/RTP. Using WDS-bridging,[27] the AirPort Express can allow AirPlay functionality (as well as Internet access, file and print sharing, etc.) across a larger distance in a mixed environment of wired and up to 10 wireless clients.

AirPlay Mirroring

At WWDC 2011, Steve Jobs, then CEO of Apple Inc., announced AirPlay Mirroring as a feature in iOS 5 where the user can stream the screen from an iPad 2 to an HDTV wirelessly and securely without the need for cables.[28][29]

AirPlay is a different technology from AirPlay Mirroring, as the former allows specific content formats to be streamed, while the latter allows the whole screen to be broadcast from a variety of iOS devices and iTunes to an Apple TV (2nd Gen or later). The exact composition of the protocols that AirPlay Mirroring uses have not yet fully been discovered, or reverse-engineered.[29] However, an unofficial AirPlay protocol specification is available.[30] Supported hardware (when using OS X Mountain Lion or later) includes any 2011 or later iMac, Mac mini, MacBook Air, MacBook Pro, or the Mac Pro (late 2013 or newer).[31]

Reverse engineering

When the protocol was known as AirTunes, it was reverse-engineered by Jon Lech Johansen in 2008.[25]

On April 8, 2011, James Laird reverse-engineered and released the private key used by the Apple AirPort Express to decrypt incoming audio streams.[32] The release of this key means that third-party software and devices modified to use the key will be able to decrypt and play back or store AirPlay streams.[33] Laird released ShairPort as an example of an audio-only software receiver implementation of AirPlay.[34] Soon more followed and in 2012 the first AirPlay audio and video receiver for PC came with a product called AirServer.[35][36]

An open-source AirPlay mirroring server (receiver) known as RPiPlay is available for the Raspberry Pi and Desktop Linux operating systems. The author describes it as being based on dsafa22's Android mirroring server, which was in turn based on Juho Vähä-Herttua's ShairPlay.[37]

With Shairport Sync,[38] there is an implementation that supports AirPlay and parts of AirPlay 2 that runs on Linux and FreeBSD and works well on embedded devices such as Raspberry Pis or OpenWrt-powered routers.

See also

Notes

  1. "Apple Unveils AirPort Express for Mac & PC Users". Apple.com. June 7, 2005. https://www.apple.com/pr/library/2004/jun/07airport.html. 
  2. Brownlee, John (September 1, 2010). "September iPod Event: In iOS 4.2, AirTunes Becomes AirPlay". Cult of Mac. http://www.cultofmac.com/september-ipod-event-in-ios-4-2-airtunes-becomes-airplay/57429. 
  3. "Apple unveils iOS 11 with P2P Apple Pay transfers, a new sound for Siri, AirPlay 2, more". June 5, 2017. http://appleinsider.com/articles/17/06/05/apple-unveils-ios-11-with-p2p-apple-pay-transfers-a-new-sound-for-siri-airplay-2-more. 
  4. "iOS 11.4 brings stereo pairs and multi-room audio with AirPlay 2". May 29, 2018. https://www.apple.com/newsroom/2018/05/ios-11-4-brings-stereo-pairs-and-multi-room-audio-with-airplay-2/. 
  5. "iOS 11.4 brings stereo pairs and multi-room audio with AirPlay 2" (in en-US). https://www.apple.com/newsroom/2018/05/ios-11-4-brings-stereo-pairs-and-multi-room-audio-with-airplay-2/. 
  6. "AirPlay 2 FAQ: What it is, how it works, and which devices support it" (in en). Macworld. https://www.macworld.com/article/3237660/ios/airplay-2-faq-what-it-is-how-it-works-and-which-devices-support-it.html. 
  7. "iOS 11 brings new features to iPhone and iPad this fall". https://www.apple.com/newsroom/2017/06/ios-11-brings-new-features-to-iphone-and-ipad-this-fall/. 
  8. "Use AirPlay to stream content from iTunes on your computer" (in en-GB). Apple Support. https://support.apple.com/en-gb/HT202809. 
  9. "About AirPlay Mirroring in OS X Mountain Lion". http://support.apple.com/kb/HT5404. 
  10. "HTC's 10 is the first Android phone with Apple AirPlay streaming". Engadget. April 12, 2016. https://www.engadget.com/2016/04/12/htcs-10-is-the-first-android-phone-with-apple-airplay-streaming/. 
  11. "ApowerMirror". https://www.apowersoft.com/phone-mirror. 
  12. Rose, Michael. "iOS 4.3 spotlight: AirPlay improvements and 720p playback". TUAW. AOL. http://www.tuaw.com/2011/03/09/ios-4-3-spotlight-airplay-improvements-and-720p-playback/. 
  13. "iTunes Remote". Apple.com. https://www.apple.com/itunes/remote/. 
  14. "Optimus Player". May 7, 2019. https://www.optimusplayer.com. 
  15. Mo, Darren (2019-05-07). "A helper tool that enables Optimus Player to stream audio using AirPlay 2". https://github.com/Optimus-Player/AirPlay-Enabler. 
  16. "How-To: Turn your Raspberry Pi into a AirPlay receiver to stream music from your iPhone". July 27, 2013. http://raspberrypihq.com/how-to-turn-your-raspberry-pi-into-a-airplay-receiver-to-stream-music-from-your-iphone/. 
  17. Kafasis, Paul (September 20, 2013). "Warning on Apple TV version 6.0". Under the Microsope. Rogue Amoeba. http://weblog.rogueamoeba.com/2013/09/20/warning-on-apple-tv-version-6-0/. 
  18. Grobart, Sam (November 22, 2010). "Understanding AirPlay in Apple's iOS 4.2". The New York Times. http://gadgetwise.blogs.nytimes.com/2010/11/22/understanding-airplay-in-apples-ios-4-2/. 
  19. "Bang & Olufsen unveils Playmaker wireless audio bridge, makes sure AirPlay and DLNA speak Danish" (in en). Engadget. https://www.engadget.com/2012/07/19/bang-and-olufsen-unveils-playmaker-wireless-audio-bridge/. 
  20. "At CES 2019, Apple finally sets iTunes, AirPlay loose". https://www.cnet.com/news/at-ces-2019-apple-finally-sets-itunes-airplay-loose-through-samsung-lg-vizio-partnerships/. 
  21. Rossignol, Joe (March 5, 2019). "LG's Latest Smart TVs Will Receive AirPlay 2 Update in Mid 2019" (in en). https://www.macrumors.com/2019/03/05/lg-airplay-2-smart-tvs-mid-2019/. 
  22. "How do I use AirPlay and HomeKit with my Roku streaming device?". https://support.roku.com/article/360057488733. 
  23. "AirPlay no longer requires a Wi-Fi network in iOS 8". http://www.cultofmac.com/282209/airplay-longer-requires-wi-fi-network-ios-8/. 
  24. Donenfeld, Jason A.. "AirTunes 2 Protocol". ZX2C4. http://git.zx2c4.com/Airtunes2/about/. 
  25. 25.0 25.1 Hanselmann, Michael (December 16, 2008). "Add Remote Audio Output Protocol stream output plugin" (Mailing list).
  26. "Preventing audio delays while watching videos with Airfoil". Rogue Amoeba. http://rogueamoeba.com/support/knowledgebase/?showArticle=AirfoilVideoPlayer. 
  27. "Apple WDS Setup". Apple.com. February 11, 2011. http://support.apple.com/kb/HT2044. 
  28. "iOS5 – AirPlay Mirroring for iPad 2". Apple.com. https://www.apple.com/ios/ios5/features.html#more. 
  29. 29.0 29.1 "Exploring Airplay Mirroring Internals". aorensoftare.com. 2011-08-20. http://www.aorensoftware.com/blog/2011/08/20/exploring-airplay-mirroring-internals/. 
  30. "Unofficial AirPlay Protocol Specification". nto.github.com. May 29, 2012. https://nto.github.io/AirPlay.html. 
  31. "About AirPlay Mirroring in OS X". http://support.apple.com/en-us/HT201343. 
  32. Laird, James (April 8, 2011). "RAOP/Airtunes". vlc-devel (Mailing list).
  33. Cheng, Jacqui (April 11, 2011). "ShairPort emulates AirPort Express to receive AirPlay streams". Ars Technica. https://arstechnica.com/apple/news/2011/04/shairport-emulates-airport-express-to-receive-airplay-streams.ars. 
  34. Laird, James (April 11, 2011). "ShairPort 0.02 released". http://mafipulation.org/blagoblig/2011/04/08#shairport. 
  35. "Wireless Mirroring from iPad to PC Now a Reality with AirServer". LearningInHand.com. May 5, 2012. http://learninginhand.com/blog/wireless-mirroring-from-ipad-to-pc-now-a-reality-with-airser.html. 
  36. "History ‹ AirServer". http://airserver.com/history. 
  37. "RPiPlay: Authors". 30 March 2023. https://github.com/FD-/RPiPlay#authors. 
  38. "Shairport Sync". May 6, 2023. https://github.com/mikebrady/shairport-sync. 

External links

  • No URL found. Please specify a URL here or add one to Wikidata.