Merge pull request #5637 from ByteHamster/unpack-exoplayer-message

Further unpack exoplayer error messages
This commit is contained in:
ByteHamster 2022-01-04 16:27:45 +01:00 committed by GitHub
commit e8f97c28b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

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