Arun Bhardwaj
30 Dec 2025
Top 25 ExoPlayer Interview Questions and Answers
Top 25 ExoPlayer interview questions and answers with clear explanations and practical Android examples.
Top 25 ExoPlayer Interview Questions and Answers
1. What is ExoPlayer?
•ExoPlayer is an open-source media player library for Android. It is used to play audio and video inside apps.
•It gives more control and flexibility than the default MediaPlayer.
2. Why should we use ExoPlayer instead of MediaPlayer?
•ExoPlayer supports more formats like DASH, HLS, and SmoothStreaming.
•It also provides better customization for UI, buffering, and playback controls.
3. How do you add ExoPlayer to an Android project?
•ExoPlayer is added using Gradle dependency.
implementation "androidx.media3:media3-exoplayer:1.2.0"4. How do you initialize ExoPlayer?
•You create an ExoPlayer instance and attach it to PlayerView.
val player = ExoPlayer.Builder(context).build()
playerView.player = player5. How do you play a video using ExoPlayer?
•You create a MediaItem, set it to the player, and call prepare and play.
val mediaItem = MediaItem.fromUri(videoUrl)
player.setMediaItem(mediaItem)
player.prepare()
player.play()6. What is PlayerView?
•PlayerView is a UI component used to display video and playback controls.
•It is provided by ExoPlayer.
7. How do you handle ExoPlayer lifecycle?
•ExoPlayer should be initialized in onStart or onResume and released in onStop or onDestroy.
override fun onStop() {
super.onStop()
player.release()
}8. What is MediaItem in ExoPlayer?
•MediaItem represents the media that should be played, such as a video or audio file.
9. How do you play HLS or DASH streams?
•ExoPlayer supports adaptive streaming formats like HLS and DASH out of the box.
val mediaItem = MediaItem.fromUri(hlsUrl)10. How do you listen to playback state changes?
•You can use Player.Listener to listen to player events.
player.addListener(object : Player.Listener {
override fun onPlaybackStateChanged(state: Int) {}
})11. What are ExoPlayer playback states?
•Common states are IDLE, BUFFERING, READY, and ENDED.
12. How do you handle buffering in ExoPlayer?
•Buffering is handled automatically, but you can listen to BUFFERING state to show loaders.
13. How do you show or hide playback controls?
•PlayerView provides built-in controls that can be customized or hidden.
playerView.useController = false14. How do you handle fullscreen video in ExoPlayer?
•Fullscreen is handled by changing orientation or using a fullscreen container.
15. How do you play audio-only files?
•ExoPlayer supports audio playback the same way as video.
val mediaItem = MediaItem.fromUri(audioUrl)16. How do you pause and resume playback?
•You can pause or resume playback using playWhenReady or play().
player.pause()
player.play()17. How do you seek to a position?
•You can move playback to a specific time using seekTo().
player.seekTo(10_000)18. How do you handle errors in ExoPlayer?
•Errors can be handled using Player.Listener.
override fun onPlayerError(error: PlaybackException) {}19. What is SimpleExoPlayer?
•SimpleExoPlayer was the older ExoPlayer implementation.
•Now it is replaced by ExoPlayer.Builder in Media3.
20. How do you release ExoPlayer properly?
•Always release the player when it is no longer needed.
player.release()21. Can ExoPlayer play offline videos?
•Yes, ExoPlayer supports offline playback using downloaded media.
22. How do you add subtitles in ExoPlayer?
•Subtitles can be added using MediaItem.SubtitleConfiguration.
23. 23. How do you change playback speed?
•Playback speed can be changed using PlaybackParameters.
player.setPlaybackSpeed(1.5f)24. How do you loop a video?
•You can loop a video by setting repeat mode.
player.repeatMode = Player.REPEAT_MODE_ONE25. Where is ExoPlayer commonly used?
•ExoPlayer is commonly used in video streaming apps, OTT apps, and TV apps.
Recommended Tutorials
Jetpack Compose: Modern UI Toolkit for Android
Jetpack Compose simplifies Android UI development using declarative programming with less code, reactive state management, and modern design principles.
MVVM Architecture in Android with Kotlin
Learn MVVM architecture in Android using Kotlin. Understand Model, View, ViewModel, LiveData, and how MVVM helps you build clean, scalable, and testable Android apps.
Top 50 Android Kotlin Interview Questions and Answers
Top 50 Android Kotlin interview questions and answers with clear explanations and practical code examples.
Top 50 Android Java Interview Questions and Answers
Top 50 Android Java interview questions and answers with simple explanations and practical examples.