1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-09-30 07:50:50 +00:00

Merge pull request #1902 from Ping20002015/master

Fix NPE for issue #1901
This commit is contained in:
Christian Schabesberger 2018-11-30 12:08:59 +01:00 committed by GitHub
commit 805d328d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1134,6 +1134,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();