Difference between revisions of "AirPlay"

From The iPhone Wiki
Jump to: navigation, search
m
 
(9 intermediate revisions by 6 users not shown)
Line 7: Line 7:
 
# Display photos and slideshows from an iOS device.
 
# Display photos and slideshows from an iOS device.
 
# Stream audio from an iOS device or iTunes. This used to be referred to as AirTunes and is now also often referred to as AirPlay.
 
# Stream audio from an iOS device or iTunes. This used to be referred to as AirTunes and is now also often referred to as AirPlay.
# Display videos from an iOS device or iTunes. This mostly referred to AirPlay as well.
+
# Display videos from an iOS device or iTunes. This is mostly referred to AirPlay as well.
# Show the screen content from an iOS device or OS X Mountain Lion. This is also called AirPlay Mirroring.
+
# Show the screen content from an iOS device or OS X Mountain Lion. This is called AirPlay Mirroring.
   
AirPlay (Streaming of Photos, Audio and Video) was first introduced in iOS 4.2, AirPlay Mirroring came with iOS 5.0. Early developer builds had the feature integrated in all apps using the standard video controller, but in the final release it was limited to the iPod (Videos on iPod touch and iPad) and YouTube apps.
+
AirPlay (streaming of photos, audio and video) was first introduced in iOS 4.2, AirPlay Mirroring came with iOS 5.0. Early developer builds had the feature integrated in all apps using the standard video controller, but in the final release it was limited to the iPod (videos on iPod touch and iPad) and YouTube apps.
 
However, it is possible to enable AirPlay in 3rd party apps on jailbroken devices.[http://www.9to5mac.com/38336/cydia-hack-enables-airplay-in-all-apps]
 
However, it is possible to enable AirPlay in 3rd party apps on jailbroken devices.[http://www.9to5mac.com/38336/cydia-hack-enables-airplay-in-all-apps]
   
Currently the only supported target for video / photo streaming is 2nd gen and 3rd gen Apple TV, while other companies are expected to release compatible products in the future.
+
Currently the only supported target for video / photo streaming is [[K66AP|Apple TV (2nd generation)]] and [[J33AP|Apple TV (3rd generation)]], while other companies are expected to release compatible products in the future.
   
 
Mac users can download AirPlayer by Erica Sadun that can receive video from an iOS device [http://www.tuaw.com/2010/12/14/hacksugar-mac-based-airplay-service-allows-device-to-mac-playba/]. It is quite buggy at the moment, does not support audio, DRM-protected video, or [[iTunes]] as a source, but it's still an important achievement as the first independent implementation of AirPlay.
 
Mac users can download AirPlayer by Erica Sadun that can receive video from an iOS device [http://www.tuaw.com/2010/12/14/hacksugar-mac-based-airplay-service-allows-device-to-mac-playba/]. It is quite buggy at the moment, does not support audio, DRM-protected video, or [[iTunes]] as a source, but it's still an important achievement as the first independent implementation of AirPlay.
Line 39: Line 39:
 
|-
 
|-
 
! Receiving supported by (official)
 
! Receiving supported by (official)
| Apple TV 2G, Apple TV 3G
+
| [[K66AP|Apple TV (2nd generation)]], [[J33AP|Apple TV (3rd generation)]]
| Apple TV 2G, Apple TV 3G, Aiport Express, AirPlay certified receivers
+
| [[K66AP|Apple TV (2nd generation)]], [[J33AP|Apple TV (3rd generation)]], AirPort Express, AirPlay certified receivers
| Apple TV 2G, Apple TV 3G
+
| [[K66AP|Apple TV (2nd generation)]], [[J33AP|Apple TV (3rd generation)]]
| Apple TV 2G, Apple TV 3G
+
| [[K66AP|Apple TV (2nd generation)]], [[J33AP|Apple TV (3rd generation)]]
 
|-
 
|-
 
! Receiving supported by (unofficial)
 
! Receiving supported by (unofficial)
 
| -
 
| -
| [https://github.com/albertz/shairport ShairPort]
+
| [https://github.com/albertz/shairport ShairPort], AirServer
| [https://github.com/nto/AirView AirView], [http://ericasadun.com/ftp/AirPlay/ AirPlayer]
+
| [https://github.com/nto/AirView AirView], [http://ericasadun.com/ftp/AirPlay/ AirPlayer], AirServer
  +
| AirServer
| -
 
 
|-
 
|-
 
! Sending supported by (official)
 
! Sending supported by (official)
| iTunes, iPhone (Photos App), iPad (Photos App)
+
| iPad (Photos App), [[iTunes]], iPhone (Photos App), iPod touch (Photos App)
| iTunes, iPhone (Music App), iPad (Music App)
+
| iPad (iPod/Music App), [[iTunes]], iPhone (iPod/Music App), iPod touch (Music App)
| iTunes, iPhone (Movies App), iPad (Movies App)
+
| iPad (Videos App), [[iTunes]], iPhone (iPod/Videos App), iPod touch (Videos App)
| iTunes, iPhone, iPad, Mountain Lion, AirParrot Software
+
| iPad, iPhone, iPod touch, OS X Mountain Lion
 
|-
 
|-
 
! Sending supported by (unofficial)
 
! Sending supported by (unofficial)
Line 60: Line 60:
 
| [http://nanocr.eu/software/justeport/ JustePort]
 
| [http://nanocr.eu/software/justeport/ JustePort]
 
| [http://ericasadun.com/ftp/AirPlay/ AirFlick]
 
| [http://ericasadun.com/ftp/AirPlay/ AirFlick]
  +
| AirParrot
| -
 
 
|}
 
|}
   
Line 67: Line 67:
   
 
# Only valid software (iTunes) can send content (can encrypt content).
 
# Only valid software (iTunes) can send content (can encrypt content).
#* This is ensured by iTunes using the RSA public key (public maybe misleading here as Apple took good care that this key is not easily revealed) whenever content is sent encrypted. The public keys were found by Jon Lech Johansen in August, 2004. This allowed "invalid" (other than [[iTunes]]) software - e.g. ALSA under Linux - to stream audio to 'valid' AirPort Express devices.
+
#* This is ensured by iTunes using the RSA public key (public maybe misleading here as Apple took good care that this key is not easily revealed) whenever content is sent encrypted. The public keys were found by Jon Lech Johansen in {{date|2004|08}}. This allowed "invalid" (other than [[iTunes]]) software - e.g. ALSA under Linux - to stream audio to 'valid' AirPort Express devices.
 
# Only valid devices (Apple TV & Airport Express) can receive content (can decrypt content).
 
# Only valid devices (Apple TV & Airport Express) can receive content (can decrypt content).
 
#* This is ensured by valid devices using the RSA private key. Only the private key can be used to decrypt content which was encrypted with the public key (1). The private key was found by James Laird in 2011, allowing "valid" software ([[iTunes]]) to stream audio to 'invalid' devices - e.g. a Linux system running Shairport.
 
#* This is ensured by valid devices using the RSA private key. Only the private key can be used to decrypt content which was encrypted with the public key (1). The private key was found by James Laird in 2011, allowing "valid" software ([[iTunes]]) to stream audio to 'invalid' devices - e.g. a Linux system running Shairport.
Line 87: Line 87:
 
[http://nanocr.eu/sw/justeport/itunesrsakeys.txt List of all] iTunes RSA Public keys found by Johansen.
 
[http://nanocr.eu/sw/justeport/itunesrsakeys.txt List of all] iTunes RSA Public keys found by Johansen.
   
By using these keys any application can stream audio to an [[AirPort]] Express.
+
By using these keys any application can stream audio to a receiving device.
   
 
==== RSA private key stored in AirPort Express ====
 
==== RSA private key stored in AirPort Express ====
Line 113: Line 113:
 
2gG0N5hvJpzwwhbhXqFKA4zaaSrw622wDniAK5MlIE0tIAKKP4yxNGjoD2QYjhBGuhvkWKY=
 
2gG0N5hvJpzwwhbhXqFKA4zaaSrw622wDniAK5MlIE0tIAKKP4yxNGjoD2QYjhBGuhvkWKY=
 
-----END RSA PRIVATE KEY-----
 
-----END RSA PRIVATE KEY-----
  +
  +
Source: [http://mafipulation.org/blagoblig/2011/04/08 James Laird's blog].
   
 
This is used so audio can be streamed to 'invalid' devices.
 
This is used so audio can be streamed to 'invalid' devices.
Line 125: Line 127:
 
* [http://git.zx2c4.com/Airtunes2/about/ AirTunes2]
 
* [http://git.zx2c4.com/Airtunes2/about/ AirTunes2]
 
* [http://xmms2.org/wiki/Technical_note_to_describe_the_Remote_Audio_Access_Protocol_%28RAOP%29_as_used_in_Apple_iTunes_to_stream_music_to_the_Airport_Express_%28ApEx%29. Technical note to describe the Remote Audio Access Protocol as used in Apple iTunes to stream music to the Airport Express]
 
* [http://xmms2.org/wiki/Technical_note_to_describe_the_Remote_Audio_Access_Protocol_%28RAOP%29_as_used_in_Apple_iTunes_to_stream_music_to_the_Airport_Express_%28ApEx%29. Technical note to describe the Remote Audio Access Protocol as used in Apple iTunes to stream music to the Airport Express]
 
{{stub|software}}
 

Latest revision as of 13:46, 17 September 2021

AirPlay is the marketing name of Apple's technology for streaming audio and video between iTunes and iOS devices. It is an evolution of AirTunes that was limited to streaming audio from iTunes to Airport Express base stations.

Audio-only content is streamed by using the AirTunes / RAOP (Remote Audio Output Protocol) technology. Video/photo content is based on HTTP live streaming.

Basically currently AirPlay and its protocols cover 4 streaming scenarios:

  1. Display photos and slideshows from an iOS device.
  2. Stream audio from an iOS device or iTunes. This used to be referred to as AirTunes and is now also often referred to as AirPlay.
  3. Display videos from an iOS device or iTunes. This is mostly referred to AirPlay as well.
  4. Show the screen content from an iOS device or OS X Mountain Lion. This is called AirPlay Mirroring.

AirPlay (streaming of photos, audio and video) was first introduced in iOS 4.2, AirPlay Mirroring came with iOS 5.0. Early developer builds had the feature integrated in all apps using the standard video controller, but in the final release it was limited to the iPod (videos on iPod touch and iPad) and YouTube apps. However, it is possible to enable AirPlay in 3rd party apps on jailbroken devices.[1]

Currently the only supported target for video / photo streaming is Apple TV (2nd generation) and Apple TV (3rd generation), while other companies are expected to release compatible products in the future.

Mac users can download AirPlayer by Erica Sadun that can receive video from an iOS device [2]. It is quite buggy at the moment, does not support audio, DRM-protected video, or iTunes as a source, but it's still an important achievement as the first independent implementation of AirPlay.

Overview

AirPlay Technology Display photos and slideshows Stream audio Stream video Display mirroring
Commonly Know as - AirPlay, AirTunes AirPlay AirPlay Mirroring
Used Protocols, Technology HTTP RAOP, RTSP, RTP HTTP HTTP, NTP
Receiving supported by (official) Apple TV (2nd generation), Apple TV (3rd generation) Apple TV (2nd generation), Apple TV (3rd generation), AirPort Express, AirPlay certified receivers Apple TV (2nd generation), Apple TV (3rd generation) Apple TV (2nd generation), Apple TV (3rd generation)
Receiving supported by (unofficial) - ShairPort, AirServer AirView, AirPlayer, AirServer AirServer
Sending supported by (official) iPad (Photos App), iTunes, iPhone (Photos App), iPod touch (Photos App) iPad (iPod/Music App), iTunes, iPhone (iPod/Music App), iPod touch (Music App) iPad (Videos App), iTunes, iPhone (iPod/Videos App), iPod touch (Videos App) iPad, iPhone, iPod touch, OS X Mountain Lion
Sending supported by (unofficial) - JustePort AirFlick AirParrot

Encryption

AirPlay / AirTunes uses public-private-key cryptography to ensure that only valid devices 'talk' to each other. This ensures 2 things:

  1. Only valid software (iTunes) can send content (can encrypt content).
    • This is ensured by iTunes using the RSA public key (public maybe misleading here as Apple took good care that this key is not easily revealed) whenever content is sent encrypted. The public keys were found by Jon Lech Johansen in August 2004. This allowed "invalid" (other than iTunes) software - e.g. ALSA under Linux - to stream audio to 'valid' AirPort Express devices.
  2. Only valid devices (Apple TV & Airport Express) can receive content (can decrypt content).
    • This is ensured by valid devices using the RSA private key. Only the private key can be used to decrypt content which was encrypted with the public key (1). The private key was found by James Laird in 2011, allowing "valid" software (iTunes) to stream audio to 'invalid' devices - e.g. a Linux system running Shairport.

Public & Private Keys

RSA public key stored in iTunes

AirPort Express RSA Public Key, Modulus:

59dE8qLieItsH1WgjrcFRKj6eUWqi+bGLOX1HL3U3GhC/j0Qg90u3sG/1CUtwC
5vOYvfDmFI6oSFXi5ELabWJmT2dKHzBJKa3k9ok+8t9ucRqMd6DZHJ2YCCLlDR
KSKv6kDqnw4UwPdpOMXziC/AMj3Z/lUVX1G7WSHCAWKf1zNS1eLvqr+boEjXuB
OitnZ/bDzPHrTOZz0Dew0uowxf/+sG+NCK3eQJVxqcaJ/vEHKIVd2M+5qL71yJ
Q+87X6oV3eaYvt3zWZYD6z5vYTcrtij2VZ9Zmni/UAaHqn9JdsBWLUEpVviYnh
imNVvYFZeCXg/IdTQ+x4IRdiXNv5hEew==

Exponent: AQAB

Source: Jon Lech Johansen’s blog

List of all iTunes RSA Public keys found by Johansen.

By using these keys any application can stream audio to a receiving device.

RSA private key stored in AirPort Express

-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA59dE8qLieItsH1WgjrcFRKj6eUWqi+bGLOX1HL3U3GhC/j0Qg90u3sG/1CUt
wC5vOYvfDmFI6oSFXi5ELabWJmT2dKHzBJKa3k9ok+8t9ucRqMd6DZHJ2YCCLlDRKSKv6kDqnw4U
wPdpOMXziC/AMj3Z/lUVX1G7WSHCAWKf1zNS1eLvqr+boEjXuBOitnZ/bDzPHrTOZz0Dew0uowxf
/+sG+NCK3eQJVxqcaJ/vEHKIVd2M+5qL71yJQ+87X6oV3eaYvt3zWZYD6z5vYTcrtij2VZ9Zmni/
UAaHqn9JdsBWLUEpVviYnhimNVvYFZeCXg/IdTQ+x4IRdiXNv5hEewIDAQABAoIBAQDl8Axy9XfW
BLmkzkEiqoSwF0PsmVrPzH9KsnwLGH+QZlvjWd8SWYGN7u1507HvhF5N3drJoVU3O14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ISgxB2bB3HcYzQMGsz1qJ
2gG0N5hvJpzwwhbhXqFKA4zaaSrw622wDniAK5MlIE0tIAKKP4yxNGjoD2QYjhBGuhvkWKY=
-----END RSA PRIVATE KEY-----

Source: James Laird's blog.

This is used so audio can be streamed to 'invalid' devices.

External Links