AirPlay — what it is, Apple wireless streaming protocol and how it works

Author: IT Sectr Published: 2026-05-25 Reading time: 9 min

AirPlay is a wireless Apple protocol for transmitting audio, video, and photos between devices over a local Wi-Fi network without quality loss. Unlike Bluetooth, AirPlay uses a Wi-Fi connection, providing significantly greater bandwidth and range. According to Apple Developer (2026), AirPlay 2 supports multi-room audio and synchronization between multiple speakers with less than 100 ms latency.

Key Takeaways

  • AirPlay is a wireless Apple protocol for streaming multimedia over Wi-Fi between devices on a local network
  • AirPlay 2 adds multi-room audio, 10-second buffering, and control via iOS Control Center
  • The protocol uses Wi-Fi Direct and mDNS for device discovery without an intermediate server
  • Video is transmitted via HLS (HTTP Live Streaming) with automatic bitrate adaptation
  • Support is available on iOS, iPadOS, macOS, Apple TV, HomePod, and third-party TVs with an AirPlay chip

What is AirPlay?

AirPlay is a proprietary wireless Apple protocol that allows transmitting audio, video, photos, and screen between devices on a local network. The protocol was introduced in 2010 as AirPlay (formerly AirTunes for audio only) and has gone through several iterations: the basic version for single-room playback, AirPlay 2 with multi-room synchronization (2018), and AirPlay Receiver for third-party devices (2021).

The main purpose of AirPlay is streaming content from iPhone, iPad, or Mac to Apple TV, HomePod, as well as compatible Samsung, LG, Sony, and TCL TVs without additional cables. Unlike Chromecast, AirPlay does not require an intermediate cloud server — data transmission happens directly between devices over the local network (peer-to-peer), which reduces latency and does not consume internet bandwidth.

The protocol supports AES-128 encryption to protect content during transmission, which is especially important for streaming protected video (DRM). AirPlay uses Apple's FairPlay technology for digital rights management, allowing legal streaming of content from iTunes Store, Apple TV+, and other services to external devices.

How AirPlay Works

AirPlay uses a combination of protocols for device discovery, connection establishment, and data transmission. The process begins with discovery: the source device (iPhone) sends multicast DNS (mDNS) queries to the local network. Receivers such as Apple TV, HomePod, or AirPlay-enabled TVs respond, announcing their availability and supported formats. After discovery, the source and receiver establish a direct peer-to-peer connection via Wi-Fi Direct, bypassing the router if the devices are within line of sight.

For audio transmission, AirPlay uses its own protocol based on RTSP (Real-Time Streaming Protocol) with the ALAC (Apple Lossless Audio Codec) for lossless compression. Standard audio is transmitted in 16-bit/44.1 kHz format, while AirPlay 2 supports up to 24-bit/48 kHz. According to Apple AVFoundation (2026), audio latency in AirPlay 2 is less than 100 ms even with multi-room synchronization, making the protocol suitable for video streaming and gaming.

Video transmission is implemented via HTTP Live Streaming (HLS). The source encodes video into multiple streams with different bitrates, packages them into MPEG-TS segments, and transmits them through a regular HTTP server running on the source device. The receiver subscribes to the HLS stream, downloads segments, and plays them with buffering. This approach provides adaptive bitrate — video quality automatically adjusts to the current network bandwidth.

AirPlay Formats and Codecs

Data TypeCodecQuality
AudioALAC (Apple Lossless)16-bit/44.1 kHz — 24-bit/48 kHz
VideoH.264, HEVC (H.265)Up to 4K at 60 fps
PhotoJPEG, HEIF, PNGOriginal resolution
ScreenH.264Up to 1080p at 30 fps

AirPlay 2: Multi-Room Audio and Buffering

AirPlay 2 is the second generation of the protocol, released in 2018 with iOS 11.4. The main innovation is multi-room audio support: the user can send sound to multiple HomePod, Apple TV, and third-party devices simultaneously, synchronizing them with millisecond precision. This became possible thanks to the introduction of a shared clock and a buffering mechanism on the receiver side.

Each receiver device buffers up to 10 seconds of audio before starting playback. The source sends packets with timestamps, and the receivers align their timings so that sound from different speakers reaches the listener simultaneously. According to Apple, synchronization between AirPlay 2 devices has jitter of less than 1 ms, which is physically imperceptible to the human ear. This allows setting up a full multi-room audio system without purchasing expensive AV receivers.

AirPlay 2 also added system integration: playback control is available from the iOS Control Center, the lock screen, and even via Siri. The user can say “Hey Siri, play jazz in the kitchen” — and the voice assistant will start streaming to the corresponding HomePod. For developers, Apple provided the MediaPlayer framework with the MPNowPlayingInfoCenter class for displaying track information and controlling playback from any application.

AirPlay vs Bluetooth: Comparison

Although Bluetooth and AirPlay both serve wireless audio transmission, there are fundamental differences between them. Bluetooth A2DP transmits sound over a distance of up to 10 meters with a maximum SBC codec quality (328 kbps), while AirPlay over Wi-Fi covers the entire local network (up to 50 meters indoor) with a bitrate of up to 1.5 Mbps. For streaming music in Lossless quality, AirPlay is the only wireless option in the Apple ecosystem.

ParameterAirPlayBluetooth A2DP
Connection TypeWi-Fi (2.4/5 GHz)2.4 GHz RF
RangeUp to 50 metersUp to 10 meters
Audio QualityLossless (ALAC)SBC/AAC compression
Latency~100 ms~200–300 ms
Multi-RoomYes (AirPlay 2)No
Power ConsumptionHigher (Wi-Fi module)Low

Bluetooth remains the preferred choice for headphones and portable speakers away from home due to its low power consumption. AirPlay is for home streaming to stationary devices where sound quality and multi-room synchronization matter. In practice, both protocols coexist: AirPlay at home, Bluetooth for outdoors and the car.

Implementing AirPlay in an iOS App

To add AirPlay support to an iOS app, the developer does not need to implement the protocol from scratch — Apple provides ready-made UI components in the AVKit framework. The main element is AVRoutePickerView, which displays a button for selecting the output device. When pressed, the system automatically scans available AirPlay receivers and lets the user choose the target device.

swift
import AVKit
import AVFoundation

class VideoPlayerViewController: UIViewController {

    let player = AVPlayer()
    let routePicker = AVRoutePickerView()

    override func viewDidLoad() {
        super.viewDidLoad()
        routePicker.translatesAutoresizingMaskIntoConstraints = false
        routePicker.activeTintColor = .systemBlue
        view.addSubview(routePicker)

        guard let url = URL(string: "https://example.com/stream.m3u8") else { return }
        let item = AVPlayerItem(url: url)
        player.replaceCurrentItem(with: item)
        player.play()
    }
}

In the example above, an AVRoutePickerView is created and added to the view controller's hierarchy. When the button is pressed, iOS shows the system AirPicker with a list of available devices. AVPlayer automatically redirects audio/video to the selected AirPlay device without additional code — the system handles all routing.

Programmatic Switching to AirPlay

If you need programmatic routing control without a UI component, use AVAudioSession to switch output ports. This is useful for apps with custom interfaces — for example, music players with their own device list.

swift
import AVFoundation

func routeToAirPlay() {
    let session = AVAudioSession.sharedInstance()
    try? session.setCategory(.playback, mode: .default)

    let outputs = session.currentRoute.outputs
    for output in outputs {
        if output.portType == .airPlay {
            print("AirPlay device connected:", output.portName)
        }
    }
}

The routeToAirPlay method activates an audio session with the playback category and checks the current route for the .airPlay port. If the device is already connected via AirPlay, the app can configure the UI accordingly — showing the AirPlay icon as active. To track route changes in real time, subscribe to the AVAudioSession.routeChangeNotification.

Compatibility and Device Requirements

AirPlay is available on all Apple devices with iOS 4.2+, iPadOS, macOS 10.8+, and watchOS. Receivers include Apple TV (3rd generation and later), HomePod, and HomePod mini. Since 2021, Apple has opened the AirPlay Receiver protocol to third-party manufacturers: Samsung, LG, Sony, TCL, Hisense, and Philips TVs have built-in AirPlay receiving support without additional devices.

AirPlay requires a Wi-Fi connection. The peer-to-peer version (AirPlay Direct) works even without a shared router — devices create a direct Wi-Fi network. This is useful in travel situations when there is no access to a local network. AirPlay Direct is supported on iPhone 5s+, iPad Air 2+, Apple TV 4th generation, and HomePod. No password is required for connection — cryptographic authentication via iCloud Keychain or an on-screen PIN code is used.

Protocol Limitations

Despite its advantages, AirPlay has limitations. The protocol only works over Wi-Fi — Bluetooth is not supported. The maximum video resolution is 4K at 60 fps (on Apple TV 4K). Dolby Atmos audio is only available when streaming to HomePod or Apple TV with tvOS 14+. For third-party TVs, AirPlay Receiver supports only basic audio (stereo) without spatial sound. Developers should also note that AirPlay latency (~100 ms) makes the protocol unsuitable for real-time gaming — for gaming, direct cable connection or low-latency Bluetooth is better.

When implementing AirPlay in a mobile app, add the NSBonjourServices key to Info.plist specifying the _airplay._tcp and _raop._tcp services for device discovery. Do you also need a camera and microphone? No — AirPlay does not require camera or microphone access, only the local network (NSLocalNetworkUsageDescription) to discover devices on the network. Without this permission, the app will not find AirPlay receivers on iOS 14+.

Frequently Asked Questions

How is AirPlay different from Chromecast?

AirPlay uses a direct peer-to-peer connection between devices over Wi-Fi without an intermediate server. Chromecast sends a URL to the Google device, which then loads content from the internet. AirPlay is better suited for local content (photos, camera videos), while Chromecast is for streaming from cloud services.

Can AirPlay be used without Wi-Fi?

Yes, AirPlay supports peer-to-peer mode (AirPlay Direct), where iPhone and Apple TV create a direct Wi-Fi network without a router. Bluetooth is required for initial discovery, and iPhone 5s+ and Apple TV 4th generation are needed. Peer-to-peer automatically activates when devices are nearby.

Does AirPlay support Dolby Atmos?

Yes, AirPlay supports Dolby Atmos when streaming to HomePod (including HomePod mini) and Apple TV 4K with tvOS 14+. Audio is transmitted in Dolby Atmos (object-oriented sound) format via the ALAC codec. Third-party TVs do not support Atmos — only stereo.

How do I add an AirPlay button to an app?

Use AVRoutePickerView from the AVKit framework. Add it to the view hierarchy via Interface Builder or programmatically. When pressed, iOS automatically shows the system AirPicker with a list of available devices. For a custom interface, use MPVolumeView with the showsRouteButton property.

Why doesn't AirPlay find devices?

The most common reasons: devices on different Wi-Fi networks, Bluetooth is turned off, the NSLocalNetworkUsageDescription key is not added to Info.plist, or AirPlay Receiver is disabled on the TV. NSLocalNetworkUsageDescription is required for iOS 14+ — without it, the app cannot access the local network.

Summary

  • AirPlay is a wireless Apple protocol for streaming audio, video, and photos over Wi-Fi between devices on a local network
  • AirPlay 2 adds multi-room audio with up to 1 ms synchronization, 10-second buffering, and Siri control
  • The protocol uses mDNS for discovery, Wi-Fi Direct for connection, and HLS for video transmission with adaptive bitrate
  • Audio quality — Lossless via ALAC up to 24-bit/48 kHz, exceeding Bluetooth A2DP by 3–4 times in bitrate
  • Implementation in an iOS app requires AVRoutePickerView, NSLocalNetworkUsageDescription, and Bonjour service registration
  • AirPlay Direct works without a router via peer-to-peer Wi-Fi, suitable for travel and presentations
  • Use AirPlay for home streaming, Bluetooth for portable headphones and the car

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also