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:
committed by
John Zhen Mo
parent
eebd83d6ac
commit
f5b5982e1c
@@ -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
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
Reference in New Issue
Block a user