Fix DemoPlayer's spurious transition through STATE_IDLE.
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.
Showing
with
7 additions
and
5 deletions
Please
register
or
sign in
to comment