1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-11-16 23:27:15 +00:00

Make use of isPlaying feature of ExoPlayer 2.10.5

This commit is contained in:
Robin
2019-10-07 10:16:36 +02:00
committed by TobiGr
parent bf353875b0
commit 50b51f931e

View File

@@ -1194,10 +1194,7 @@ public abstract class BasePlayer implements
} }
public boolean isPlaying() { public boolean isPlaying() {
if (simpleExoPlayer == null) return false; return simpleExoPlayer != null && simpleExoPlayer.isPlaying();
final int state = simpleExoPlayer.getPlaybackState();
return (state == Player.STATE_READY || state == Player.STATE_BUFFERING)
&& simpleExoPlayer.getPlayWhenReady();
} }
@Player.RepeatMode @Player.RepeatMode