Closed
Description
Version
Media3 1.1.0
More version details
I use an ExoPlayer to play audio files of various lengths, some of them very short.
After updating to 1.1.0 I found that the STATE_ENDED event is no longer generated for the very short clips.
It still works fine for longer audio clips.
Events STATE_BUFFERING and STATE_READY are still generated, only ENDED is missing.
Devices that reproduce the issue
Any device.
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
No
Reproduction steps
AudioAttributes attributes = new AudioAttributes.Builder().setContentType(AUDIO_CONTENT_TYPE_MUSIC).build();
ExoPlayer player = new ExoPlayer.Builder(App.context)
.setAudioAttributes(attributes, false)
.build();
player.setAudioSessionId(audioSessionId);
player.setWakeMode(WAKE_MODE_NETWORK);
player.setVolume(1f);
player.setPlayWhenReady(true);
player.addListener(new Player.Listener() {
public void onPlaybackStateChanged(int state) {
//print states or put a breakpoint here
}
@Override
public void onPlayerError(@NonNull PlaybackException error) {
//print error or put a breakpoint here
}
});
player.setMediaItem(mediaItem); //use the clip I attached to the bug report
player.prepare();
Expected result
The STATE_ENDED event should be generated.
Actual result
STATE_ENDED result never comes.
Media
Bug Report
- You will email the zip file produced by
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.