Media and streaming is one of the key competencies in modern mobile development. According to Statista (2025), the global video streaming market will exceed $100 billion by 2027. Mobile devices account for over 60% of all streaming platform traffic. A developer needs to understand protocols, players, content protection mechanisms, and features like Picture-in-Picture. High-quality streaming in mobile apps requires mastery of all these technologies.
Key Takeaways
HTTP Live Streaming (HLS) is a protocol for streaming in mobile apps developed by Apple. It splits video into small segments (usually 6–10 seconds) and transmits them over regular HTTP. The player downloads a playlist (.m3u8) and sequentially loads segments, adapting quality to connection speed. HLS provides reliable streaming in mobile apps on all Apple devices and is the de facto standard for iOS.
DASH (Dynamic Adaptive Streaming over HTTP) is an open MPEG standard for delivering media to mobile apps. Unlike HLS, DASH uses MP4 format for segments and an XML manifest (MPD) instead of .m3u8. DASH provides more control over codecs and supports more formats. Choosing between HLS and DASH is a key decision when developing streaming for mobile devices. The protocol comparison is shown in the table below.
| Parameter | HLS | DASH |
|---|---|---|
| Developer | Apple | MPEG (open standard) |
| Playlist format | .m3u8 | .mpd (XML) |
| Segments | .ts or fMP4 | fMP4 (any codec) |
| Native support | iOS, macOS, tvOS | Android, web |
| Adaptive bitrate | Yes (avc1, mp4a) | Yes (any codec) |
| Low-latency | LL-HLS (2–5 sec) | LL-DASH (2–5 sec) |
In practice, iOS apps choose HLS — AVPlayer works with it natively. For Android, DASH is preferred thanks to ExoPlayer. Both protocols are suitable for media streaming on mobile devices. At IT Sectr, we use both technologies and recommend choosing the protocol based on the target platform.
Adaptive Bitrate (ABR) is a mechanism where the player automatically selects video quality based on connection speed. The stream is encoded at multiple bitrates (360p, 720p, 1080p, 4K). The player switches between them without pauses. Codecs: H.264 (AVC) — baseline, H.265 (HEVC) — 50% more efficient, VP9 and AV1 — open alternatives for Android.
For hardware decoding in mobile apps, it is important to choose the right codec. Hardware Decoding uses the device's GPU/video processor and consumes less battery. Software Decoding runs on the CPU — used when hardware decoding is unavailable. IT Sectr recommends always checking codec support via MediaCodec (Android) or AVAssetTrack (iOS) for optimal media playback on mobile devices.
ExoPlayer is a media player from Google for Android, optimized for media playback in mobile apps. Unlike MediaPlayer, ExoPlayer is not tied to hardware decoding and supports custom schemes through extension modules. It works with HLS, DASH, SmoothStreaming, and RTSP. ExoPlayer is the main player for YouTube, Google TV, and Android TV.
AVPlayer and AVPlayerViewController are Apple players for iOS, macOS, tvOS. AVPlayer is a low-level API, AVPlayerViewController is a ready-made UI wrapper with PiP and AirPlay. Key differences: ExoPlayer gives full control over buffering and rendering, AVPlayerViewController offers quick integration with minimal code. The choice of player directly affects the quality of streaming in mobile apps.
// ExoPlayer — setting up a basic player on Android
val player = ExoPlayer.Builder(this)
.setMediaSource(ProgressiveMediaSource.Factory(DefaultHttpDataSource.Factory()))
.build()
val mediaItem = MediaItem.fromUri("https://example.com/stream.m3u8")
player.setMediaItem(mediaItem)
player.prepare()
player.playWhenReady = true
The code shows minimal ExoPlayer initialization: creating an instance, setting the media item, and starting playback. ExoPlayer automatically handles the Activity lifecycle through player.release() in onStop. For Android TV or PiP, additional lifecycle handling via PlayerView is required — this is especially important when setting up streaming for mobile apps.
Transcoding is converting video from one format to another. It is used to optimize media streams for different mobile devices (e.g., H.264 → H.265). On mobile devices, transcoding is possible via MediaCodec (Android) or AVAssetExportSession (iOS). Transcoding is resource-intensive and drains the battery — do it in the background using WorkManager or BGTaskScheduler.
Digital Rights Management (DRM) are systems for protecting media content from unauthorized copying. Three main technologies are used for streaming premium media in mobile apps: Widevine (Google), FairPlay (Apple), and PlayReady (Microsoft). Without DRM, premium services (Netflix, Spotify, Disney+) cannot distribute content.
Widevine is the DRM protection standard for Android, available in three levels: L3 (software encryption), L2, L1 (hardware encryption, Trusted Execution Environment only). FairPlay is Apple's exclusive system, using SVP (Secure Video Pipeline) at the chip level. PlayReady is Microsoft's system, prevalent on Xbox and Windows devices.
Multi-DRM is an approach where you use a single platform to manage all DRM keys. For example: EZDRM or Verimatrix. They issue Widevine, FairPlay, and PlayReady licenses through a unified API. Multi-DRM is especially relevant for premium media on mobile devices. At IT Sectr, we implement multi-DRM through aggregators — this saves time and money compared to integrating each DRM separately.
Audio Focus (Android) is an audio stream management system for media playback in mobile apps. When your app requests Audio Focus, other apps (music, podcasts) pause or lower their volume (ducking). Without Audio Focus, two apps would play simultaneously, creating noise.
Android divides audio streams into types: MUSIC, VOICE_CALL, ALARM, NOTIFICATION. For a media player, you need to request AudioManager.AUDIOFOCUS_GAIN. When focus is lost (incoming call), you must pause media playback and resume after focus returns. Implementation via AudioManager.OnAudioFocusChangeListener.
Audio Session (iOS) is the equivalent of Audio Focus for media apps on Apple mobile devices. It is configured via AVAudioSession.sharedInstance(). Categories: .playback (required for video), .soloAmbient (default, silent when locked), .playAndRecord (for recording). For streaming, use .playback with the .allowAirPlay option.
Picture-in-Picture (PiP) is a mode where media content continues playing in a small floating window when the app is minimized or the user navigates to another screen. PiP has become standard for media apps on mobile devices — iOS (since iPadOS 13) and Android (since Android 8.0).
On Android, PiP is enabled via Activity.isInPictureInPictureMode() and PictureInPictureParams.Builder. The app must be in multi-window mode. MediaSession is required to control media playback from the PiP window. In the manifest, specify android:supportsPictureInPicture="true".
AirPlay is Apple's protocol for streaming media to Apple TV, HomePod, and compatible Smart TVs. On iOS, it is implemented via AVRoutePickerView or MPNowPlayingInfoCenter. On Android, the equivalent is Google Cast SDK (Chromecast). Both technologies require configuration in the binary file and player support. High-quality streaming in mobile apps is impossible without one of them.
Frequently Asked Questions
For iOS, HLS is better — it is natively supported by AVPlayer. For Android and cross-platform apps, DASH is preferable because ExoPlayer provides better DASH support and more flexible buffering control. The choice of protocol directly affects streaming in mobile apps.
DRM is mandatory only if you distribute premium media content (movies, music, courses). For user-generated content or free-to-air broadcasts, DRM is not needed. IT Sectr recommends starting without DRM and adding it only when required.
ExoPlayer is a customizable media player for Android with support for DASH, HLS, and SmoothStreaming. AVPlayerViewController is a native iOS player for HLS with PiP and AirPlay. ExoPlayer gives more control, AVPlayerViewController requires less code. Both provide high-quality media playback in mobile apps.
PiP is a mode where media content continues playing in a small window when the app is minimized. On iOS, it is enabled via the AVPlayerViewController delegate, on Android via PictureInPictureParams. Requires manifest configuration and lifecycle handling.
Audio Focus (Android) and Audio Session (iOS) manage simultaneous audio playback from different sources. They ensure your media app correctly responds to calls, notifications, and the launch of other audio apps.
Summary
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.