Questions tagged [exoplayer]

ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. Including DASH and SmoothStreaming adaptive playbacks.

An application level media player for Android.

From its website:

ExoPlayer supports features not currently provided by MediaPlayer, including Dynamic adaptive streaming over HTTP (DASH), SmoothStreaming, and persistent caching. ExoPlayer can be extended to handle additional media formats, and because you include it as part of your app code, you can update it along with your app.

Documentation

The developer guide provides a wealth of information to help you get started.
The class reference documents the ExoPlayer library classes.
The release notes document the major changes in each release. The GitHub repository.

External links

Website

1959 questions
18
votes
2 answers

How to download a video while playing it, using ExoPlayer?

Background I'm working on an app that can play some short videos. I want to avoid accessing the Internet every time the user plays them, to make it faster and to lower the data usage. The problem Currently I've only found how to either play or…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
18
votes
5 answers

Exoplayer 2 prevent screen dim on video playback

I have simple player activity:
Calin
  • 6,661
  • 7
  • 49
  • 80
18
votes
6 answers

Android ExoPlayer not resuming after network is connected

Im using Exoplayer for HLS Streaming in my App. Its playing nicely but when i disconnect the internet connection and enable it again,Exo player does not resume the video play. Exoplayer is handling this by default or do i need to manually handle…
san88
  • 1,286
  • 5
  • 35
  • 60
18
votes
4 answers

ExoPlayer cache

I'm traying to use ExoPlayer for playback video over http. And I want to save video after video was loaded and play it from cache. How Do implement cache and playback from cache? Can give me any samples.
vmtrue
  • 1,724
  • 18
  • 36
17
votes
5 answers

Stopping Exoplayer onSwipe of ViewPager

I am using a ViewPager with single fragment instance in which I am showing Media files like Images, Videos, Audio. I have implemented ExoPlayer for handling Video & Audio files. And Glide for images. To avoid the memory leaks I am releasing the…
Nilesh Deokar
  • 2,975
  • 30
  • 53
17
votes
3 answers

Exo player DASH Streaming example

I'm trying to play DASH video on android devices with the ExoPlayer from Google (http://developer.android.com/guide/topics/media/exoplayer.html). The documentation is very, very poor and I cannot find some simplest working example with DASH (if…
Blagojco
  • 326
  • 1
  • 2
  • 9
16
votes
3 answers

Android: Exoplayer - ExtractorMediaSource is deprecated

I am following this tutorial to implement the Exoplayer. But the ExtractorMediaSource class is deprecated. I need to play video from a remote url. What is the alternative to use in this situation? val mediaSource = ExtractorMediaSource …
Akhil Soman
  • 2,077
  • 2
  • 17
  • 30
16
votes
4 answers

How do I make the Exoplayer controls always visible?

A few seconds after the ExoPlayer starts playing, the controls stop showing and a black background appears. How do I make sure that the controls are always visible?
OVERFLOW
  • 171
  • 1
  • 2
  • 7
16
votes
4 answers

How to catch all errors for ExoPlayer?

I implemented ExoPlayer as player for my application. But I can´t find out how to catch all ExoPlayer errors to avoid app crash. I added following listener, but it doesn´t catch all errors. I have to use DRM and it sometimes crash on some problem…
Michalsx
  • 3,446
  • 5
  • 33
  • 46
16
votes
0 answers

Android - Exoplayer 2 - play multiple sounds/audio simultaneously - MergingMediaSource

I'm using in my app several instances of SimpleExoPlayer to play audio file (Wav file). I want play all these files simultaneously. Now there is some small gap between these files. Is it possible to have only one instance of SimpleExoPlayer with…
Pepa Zapletal
  • 2,879
  • 3
  • 39
  • 69
16
votes
4 answers

Add button for full screen video with exo player

I'm using exoPlayer to stream video to my app and so far works fine. What I would like to do now is to add some extra functionality such as a button on the bottom right edge to act as a "full screen button". But there are two problems. The first is…
Mes
  • 1,671
  • 3
  • 20
  • 36
16
votes
4 answers

In Android, using exoplayer, how to fill surfaceview with a video that does not have the same aspect ratio with the device?

I have an activity that uses ExoPlayer to play a video. When I go fullscreen, unless the aspect ratio of the device is equal to that of the video, I get small black bars at the top and the bottom of the video. This is how the layout looks…
kimv
  • 1,569
  • 4
  • 16
  • 26
15
votes
4 answers

SimpleExoPlayer.Builder(this).build() deprecated

I'm using Exoplayer in my app and initializing exoplayer as player = SimpleExoPlayer.Builder(this).build() But Android Studio is giving me warning as it is deprecated. When I get to the lower version of Exoplayer 2.15.1, then warning goes off. But…
Feroz Khan
  • 2,396
  • 5
  • 20
  • 37
15
votes
10 answers

How to remove Next and Previous button from SimpleExoPlayerView in Android

I use ExoPlayer to play audio on my Android App with SimpleExoPlayerView as the controller. The default controller have five button, Play/Pause, Forward, Backward, Next, and Previous. My app only use Play/Pause, Forward, and Backward, so I want to…
Bagus Aji Santoso
  • 507
  • 1
  • 7
  • 16
15
votes
4 answers

ExoPlayer - how to play local mp3 file

I'm trying to use ExoPlayer instead of MediaPlayer because it's a common bug that MediaPlayer returns wrong getCurrentPosition() and I need a substitute. But I can't find an info anywhere how to open a local file through the file path to the file…
Lyubov Alekseeva
  • 209
  • 1
  • 4
  • 10