ExoPlayer (Media3)

ExoPlayer, now part of AndroidX Media3, is Google's open-source media player library for Android. It supports adaptive streaming (HLS, DASH) and Widevine DRM playback, and honors the FLAG_SECURE flag to block screen capture, making it the standard foundation for secure video playback in Android apps.

What is ExoPlayer?

ExoPlayer, now maintained as part of AndroidX Media3, is Google's open-source media player library for Android. It is the standard alternative to the platform's built-in MediaPlayer for apps that need serious streaming and DRM support.

Why It Matters for Secure Playback

ExoPlayer natively supports adaptive streaming over HLS and DASH and integrates Widevine DRM through Android's MediaDrm framework, handling the license exchange for protected content. It also respects the FLAG_SECURE window flag, so a secure app can cause screen recordings and screenshots of the video to capture black.

Key Capabilities

  • DRM playback: Widevine L1 and L3 via MediaDrm, including offline licenses.
  • Adaptive streaming: HLS and DASH with bitrate switching.
  • Capture blocking: Works with FLAG_SECURE for screen-record protection.

For Developers

Most secure Android video SDKs, including hosted DRM providers, build on ExoPlayer/Media3. Understanding it helps when configuring DRM sessions, handling offline downloads, and debugging playback or license errors on Android.