mirror of
https://github.com/androidx/media.git
synced 2025-05-03 21:57:46 +08:00

The spurious transitions were caused by calling pushTrackSelection in onRenderers after changing the renderer building state to BUILT and before calling player.prepare. pushTrackSelection can cause the ExoPlayer to generate state changes, since it can call setPlayWhenReady. This change transitions the renderer building state later, so that when this happens getPlaybackState correctly masks the state and returns STATE_PREPARING.
Demo application
This folder contains a demo application that uses ExoPlayer to play a number of test streams. It can be used as a starting point or reference project when developing other applications that make use of the ExoPlayer library.