Further unpack exoplayer error messages

This commit is contained in:
ByteHamster 2022-01-04 15:28:55 +01:00
parent 413df73495
commit d6381371de
1 changed files with 5 additions and 0 deletions

View File

@ -113,6 +113,11 @@ public class ExoPlayerWrapper implements IPlayer {
} else {
Throwable cause = error.getCause();
if (cause instanceof HttpDataSource.HttpDataSourceException) {
if (cause.getCause() != null) {
cause = cause.getCause();
}
}
if (cause != null && "Source error".equals(cause.getMessage())) {
cause = cause.getCause();
}
audioErrorListener.accept(cause != null ? cause.getMessage() : error.getMessage());