
Added an expiration time field to playlists blacklisted to allow Exoplayer to continue playback when playlists that failed were recovered from a bad state. In live environments, some times occur that primary encoder stop working for a while. In that cases, HLS failover mechanism in the player should detect the situation and “switch” to playlists served by the backup encoder (in case a backup encoder exists). This was well managed before these changes. However, and to ensure a playback experience that can recover itself from temporary issues, we cannot blacklist a playlist forever. When streaming live events using HLS, it is quite typical that the player needs to switch from primary to backup playlists, and from backup to primary ones, from time to time to have playback working when temporary issues in the network/encoder are happening. Most of the issues are recoverable, so what I have implemented is a mechanism that makes blacklisted playlist to be available again after a while (60 seconds). Evaluation of this algorithm should happen just when something fails. If player is working with a backup playlist, it shouldn’t switch to the primary one at least something fail.
ExoPlayer Readme
Description
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. ExoPlayer supports features not currently supported by Android’s MediaPlayer API (as of KitKat), including DASH and SmoothStreaming adaptive playbacks, persistent caching and custom renderers. Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.
Developer guide
The ExoPlayer developer guide provides a wealth of information to help you get started.
Reference documentation
Class reference (Documents the ExoPlayer library classes).
Project branches
- The master branch holds the most recent minor release.
- Most development work happens on the dev branch.
- Additional development branches may be established for major features.
Using Eclipse
The repository includes Eclipse projects for both the ExoPlayer library and its accompanying demo application. To get started:
-
Install Eclipse and setup the Android SDK.
-
Open Eclipse and navigate to File->Import->General->Existing Projects into Workspace.
-
Select the root directory of the repository.
-
Import the ExoPlayerDemo and ExoPlayerLib projects.
Using Gradle
ExoPlayer can also be built using Gradle. You can include it as a dependent project and build from source. e.g.
// settings.gradle
include ':app', ':..:ExoPlayer:library'
// app/build.gradle
dependencies {
compile project(':..:ExoPlayer:library')
}
If you want to use ExoPlayer as a jar, run:
./gradlew jarRelease
and copy library.jar to the libs-folder of your new project.