update event listener and fix play state
This commit is contained in:
parent
93066be3f2
commit
ea78038120
1 changed files with 7 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import com.dkanada.gramophone.util.MusicUtil;
|
|||
import com.dkanada.gramophone.util.PreferenceUtil;
|
||||
import com.google.android.exoplayer2.ExoPlaybackException;
|
||||
import com.google.android.exoplayer2.ExoPlayer;
|
||||
import com.google.android.exoplayer2.MediaItem;
|
||||
import com.google.android.exoplayer2.Player;
|
||||
import com.google.android.exoplayer2.SimpleExoPlayer;
|
||||
import com.google.android.exoplayer2.database.ExoDatabaseProvider;
|
||||
|
|
@ -71,6 +72,11 @@ public class MultiPlayer implements Playback {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMediaItemTransition(MediaItem mediaItem, int reason) {
|
||||
Log.i(TAG, String.format("onMediaItemTransition: %s %d", mediaItem, reason));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPositionDiscontinuity(int reason) {
|
||||
Log.i(TAG, String.format("onPositionDiscontinuity: %d", reason));
|
||||
|
|
@ -197,7 +203,7 @@ public class MultiPlayer implements Playback {
|
|||
|
||||
@Override
|
||||
public boolean isPlaying() {
|
||||
return exoPlayer.isPlaying();
|
||||
return exoPlayer.isPlaying() || exoPlayer.getPlayWhenReady();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue