From 50b51f931e28ac1b399ec72b707ad043bcb4db23 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 7 Oct 2019 10:16:36 +0200 Subject: [PATCH] Make use of isPlaying feature of ExoPlayer 2.10.5 --- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 4f7ae4e2c..b3c5716bc 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -1194,10 +1194,7 @@ public abstract class BasePlayer implements } public boolean isPlaying() { - if (simpleExoPlayer == null) return false; - final int state = simpleExoPlayer.getPlaybackState(); - return (state == Player.STATE_READY || state == Player.STATE_BUFFERING) - && simpleExoPlayer.getPlayWhenReady(); + return simpleExoPlayer != null && simpleExoPlayer.isPlaying(); } @Player.RepeatMode