1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-04-28 17:51:23 +00:00

-Improved DeferredMediaSource to build source on IO thread.

-Improved exception handling for player.
This commit is contained in:
John Zhen M
2017-10-08 13:15:03 -07:00
committed by John Zhen Mo
parent eebd83d6ac
commit f5b5982e1c
5 changed files with 101 additions and 38 deletions

View File

@@ -401,11 +401,18 @@ public final class BackgroundPlayer extends Service {
}
@Override
public void onError(Exception exception) {
public void onRecoverableError(Exception exception) {
exception.printStackTrace();
Toast.makeText(context, "Failed to play this audio", Toast.LENGTH_SHORT).show();
}
@Override
public void onUnrecoverableError(Exception exception) {
exception.printStackTrace();
Toast.makeText(context, "Unexpected error occurred", Toast.LENGTH_SHORT).show();
shutdown();
}
/*//////////////////////////////////////////////////////////////////////////
// ExoPlayer Listener
//////////////////////////////////////////////////////////////////////////*/