mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-04 16:23:08 +00:00
Try exoplayer reload on player error
This commit is contained in:
@@ -72,6 +72,9 @@ public class MultiPlayer implements Playback {
|
|||||||
public void onPlayerError(ExoPlaybackException error) {
|
public void onPlayerError(ExoPlaybackException error) {
|
||||||
Log.i(TAG, String.format("onPlayerError: %s", error.getMessage()));
|
Log.i(TAG, String.format("onPlayerError: %s", error.getMessage()));
|
||||||
Toast.makeText(context, context.getResources().getString(R.string.unplayable_file), Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, context.getResources().getString(R.string.unplayable_file), Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
exoPlayer.clearMediaItems();
|
||||||
|
exoPlayer.prepare();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user