AVPlayer (iOS)

AVPlayer is Apple's built-in media player framework for iOS, iPadOS, macOS, and tvOS. It plays HLS streams and integrates Apple FairPlay Streaming DRM through AVContentKeySession, making it the standard foundation for secure protected video playback on Apple devices.

What is AVPlayer?

AVPlayer is Apple's built-in media player framework, part of AVFoundation, used to play audio and video on iOS, iPadOS, macOS, and tvOS. It is the native foundation for video playback in Apple apps.

Why It Matters for Secure Playback

AVPlayer plays HLS streams and integrates Apple FairPlay Streaming, the only DRM Apple devices accept, through the AVContentKeySession API. This handles the SPC/CKC key exchange so protected content is decrypted inside Apple hardware. Because FairPlay is Apple-only, AVPlayer is effectively unavoidable for secure playback on iPhones and iPads.

Key Capabilities

  • FairPlay DRM: Protected HLS playback via AVContentKeySession.
  • Offline keys: Persistable content keys for secure offline downloads.
  • Native performance: Hardware-accelerated decoding on Apple devices.

For Developers

Secure iOS video SDKs, including hosted DRM providers, build on AVPlayer and AVContentKeySession. Understanding it helps when implementing FairPlay, handling certificates, enabling offline downloads, and debugging Safari or iOS playback failures.