Exoplayer 2.15 - What’s new

Christos Tsilopoulos
AndroidX Media3
Published in
2 min readAug 26, 2021

ExoPlayer 2.15 is now out! This post highlights some of the most significant changes. As always, we recommend also taking a look at the full release notes.

DASH

We’ve added support for multiple BaseURL elements in DASH manifests. An initial base URL is selected according to the declared serviceLocation, priority and weight attributes.

The LoadErrorHandlingPolicy interface has been updated to include a new getFallbackSelectionFor method, which allows the policy to specify whether fallback to a different location should be performed when a load error occurs. DefaultLoadErrorHandlingPolicy enables location fallback by default.

When a load error occurs and the LoadErrorHandlingPolicy indicates that a location fallback should be performed, base URLs are excluded based on service location and priority, and an alternative base URL is selected from the remaining set.

PlaybackException and error codes

The Player getter and listener methods for playback errors now use PlaybackException, which the existing ExoPlaybackException class now extends. The PlaybackException class includes an errorCode field, which identifies the cause of the failure in order to simplify error handling. You can find the full list of error codes here.

Using errorCode, you can determine the cause of a playback failure without having to inspect the chain of exception causes. The following snippets show an example of detecting whether a playback failed because it was left behind the live window, before and after this change.

Before:

After:

ExoPlayer assigns error codes to each failure on a best-effort basis. If you run into types of player failure where an unspecified error code is reported, we would encourage you to report them to us so that we can assign meaningful error codes instead.

As always, we recommend taking a look at the full release notes. Please feel free to get in touch via our issue tracker if you have any questions or encounter problems with the new release. Thanks for reading!

PS., we’re hiring!

--

--