diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 99d36f66e..603a44eba 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -1423,6 +1423,10 @@ public final class Player implements PlaybackListener, Listener { case ERROR_CODE_TIMEOUT: case ERROR_CODE_IO_UNSPECIFIED: case ERROR_CODE_IO_NETWORK_CONNECTION_FAILED: + isCatchableException = true; + simpleExoPlayer.pause(); + onPaused(); + break; case ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT: case ERROR_CODE_UNSPECIFIED: // Reload playback on unexpected errors: @@ -1597,6 +1601,11 @@ public final class Player implements PlaybackListener, Listener { return; } + if (!isPrepared) { + simpleExoPlayer.prepare(); + isPrepared = true; + } + audioReactor.requestAudioFocus(); if (currentState == STATE_COMPLETED) {