Questions tagged [exoplayer2.x]

ExoPlayer 2.x is a major iteration of the ExoPlayer (an open source, application level media player built on top of Android’s low level media APIs) library with significant API and architectural improvements.

ExoPlayer 2.x includes significant architectural improvements of ExoPlayer and new features.

Key architectural changes:

  • Late binding between rendering and media source components. Allows the same rendering components to be re-used from one playback to another. Enables features such as gapless playback through playlists and DASH multi-period support.

  • Improved track selection design. More details can be found here.

  • LoadControl now used to control buffering and loading across all playback types.

  • Media source components given additional structure. A new MediaSource class has been introduced. MediaSources expose Timelines that describe the media they expose, and can consist of multiple MediaPeriods. This enables features such as seeking in live playbacks and DASH multi-period support.

  • Responsibility for loading the initial DASH/SmoothStreaming/HLS manifest is promoted to the corresponding MediaSource components and is no longer the application's responsibility.

  • Higher level abstractions such as SimpleExoPlayer have been added to the library. These make the library easier to use for common use cases. The demo app is halved in size as a result, whilst at the same time gaining more functionality. Read more here.

  • Enhanced library support for implementing audio extensions.

  • Format and MediaFormat are replaced by a single Format class.

Key new features:

  • Playlist support. Includes support for gapless playback between playlist items and consistent application of LoadControl and TrackSelector policies when transitioning between items.

  • Seeking in live playbacks for DASH and SmoothStreaming.

  • DASH multi-period support.

  • MediaSource composition allows MediaSources to be concatenated into a playlist, merged and looped.

  • Looping support.

  • Ability to query information about all tracks in a piece of media (including those not supported by the device).

  • Improved player controls.

  • Support for PSSH in fMP4 moof atoms.

  • Support for Opus in Ogg.

  • CacheDataSource support for standalone media file playbacks (mp3, mp4 etc).

  • FFMPEG extension (for audio only).

In case of building a new media app, recommend building it on ExoPlayer 2.X. For those who are using ExoPlayer 1.X, you can include both 1.X and 2.X in your app (due to a different package name), allowing you to test and migrate your users with minimal impact.

634 questions
8
votes
1 answer

how to add player control ui in google IO18 audio App demo

What am I trying to do: Using google exoPlayer to play music, foreground and background. Break into details: The app launches, google exoPlayer playback control UI should be visible and starts to play immediately. As soon as the player starts to…
Bizkit
  • 95
  • 1
  • 5
8
votes
3 answers

ExoPlayer2 - How to release from fragment

I have one activity with 2 fragments (not a ViewPager) & want to use ExoPlayer2 in one of the fragments to play content. The initial fragment shows a list of content & when clicked the second fragment is shown to play the selected content. However…
JC23
  • 956
  • 3
  • 11
  • 26
7
votes
3 answers

Exoplayer - How to prevent rebuffering when it's on Repeat mode?

I'm using exoplayer 2, and have Repeat mode on, meaning it will keep playing the video once it reaches the end. However, after the video ends and plays again, it keeps rebuffering (reloading the video). How do I prevent this from happening? player =…
DIRTY DAVE
  • 921
  • 1
  • 6
  • 30
7
votes
0 answers

How to show downloading progress Exoplayer

I am trying to download a video for offline in exoplayer, I want to show downloading progress inside an activity. How can I bind to the DownloadService in exoplayer. so that I can update the current downloading progress in an activity? I try to…
ZeroErr0r
  • 1,626
  • 1
  • 12
  • 19
7
votes
1 answer

Prevent re-buffering on changing max bit rate in ExoPlayer

I am using setMaxBitrate provided by DefaultTrackSelector to set max bit rate when user changes video quality. val parameters = defaultTrackSelector.buildUponParameters() .setMaxVideoBitrate(bitrate) …
Abhishek V
  • 11,918
  • 6
  • 45
  • 60
7
votes
1 answer

Why can't I locate ProgressiveMediaSource?

Looking at the ExoPlayer documentation, the "Hello World" example suggests that to play a standard video you should use a ProgressiveMediaSource (compared to many online tutorials I've seen suggesting you use an ExtractorMediaSource) Looking at the…
stevendesu
  • 13,153
  • 13
  • 76
  • 146
7
votes
2 answers

Can I send exoplayer buffered data to other activity exoplayer

I have a exoplayer my first activity and when I click full screen button, I open a new VideoActivity full screen. I just only send my current position and start VideoActivity that position. TrackSelector trackSelector = new…
6155031
  • 3,352
  • 4
  • 19
  • 49
7
votes
1 answer

Increasing brightness of ExoPlayer 2 just like MxPlayer

I went through the entire documentation of ExoPlayer2, but couldn't find how to increase the brightness of exoplayer. I found a similar question on github My xml is as follows
Pritish
  • 9,093
  • 6
  • 32
  • 68
7
votes
3 answers

Error inflating class com.google.android.exoplayer2.ui.SimpleExoPlayerView

One Strange thing: the code is working fine while using emulator, but crashes while running building an unsigned apk. when connected to android studio, it gives the following error: java.lang.RuntimeException: Unable to start activity…
Ayush Badraj
  • 91
  • 1
  • 1
  • 4
7
votes
2 answers

Quality selector for ExoPlayer 2

I am currently developing a live and movie player application. I chose ExoPlayer version 2 to play the movie and I do not know much about it. I want to let the user choose the quality of a movie on the player screen, for example, 720p or 1080p or…
Ali Soleimani
  • 151
  • 1
  • 3
  • 14
7
votes
1 answer

Dynamic playlists with Exoplayer 2

I'd like to use ExoPlayer2 with playlists having possibility to dinamically change the tracks (add or remove them from playlist) and change the loop settings. Since ConcatenatingMediaSource has static arrays (and not lists), I'm implementing a…
Manuela
  • 440
  • 6
  • 15
6
votes
1 answer

exoplayer 2.11.* version throws Renderer error in android 5.0/5.1(Lollipop) devices

I am using exoplayer for streaming my audio file from firebase storage to my android app. exoplayer works great in android versions which is >= 6.0. But in Android 5.0/5.1(Lollipop) devices, exoplayer throws me a Renderer error. Here's the Error i…
smackbeta
  • 91
  • 3
6
votes
1 answer

Exoplayer for android, trying to stream a m3u8 file and getting error: None of the available extractors could read the stream

I am trying to stream an m3u8 file and I am getting an error. The url I am using is the following: http://storage.googleapis.com/videos.siku.org/10005/dash/master.m3u8 This streaming video does work in a browser. I am getting the following error at…
PhilBlais
  • 802
  • 2
  • 9
  • 30
6
votes
2 answers

Is there an ExoPlayer + Leanback library example for using captions?

I have found a few examples that work with Leanback and ExoPlayer and I have all that working but I can't get subtitles/captions to work. The newest Google example I could find (https://github.com/android/tv-samples) has a captions button on the…
casolorz
  • 6,790
  • 15
  • 74
  • 161
6
votes
1 answer

How to fix exo player slow loading of video

I am trying to write an app where i'll have a couple of video URLs which i need to play. I am using ExoPlayer for playing videos. ExoPlayer is playing the videos but the problem i am facing is, ExoPlayer is loading some part of video (let's say 5…
1
2
3
42 43