Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more logging
Browse files Browse the repository at this point in the history
Robin committed Jan 4, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent e1dd2b2 commit 803a0c6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/src/main/java/org/schabi/newpipe/player/Player.java
Original file line number Diff line number Diff line change
@@ -1432,17 +1432,20 @@ public void onPlayerError(@NonNull final PlaybackException error) {
break;
case ERROR_CODE_FAILED_RUNTIME_CHECK:
// Try to handle tunneling related exceptions
Log.d(TAG, "Unexpected PlaybackException! Cause: "
+ Log.getStackTraceString(error.getCause()));
String stackTrace = Log.getStackTraceString(error.getCause());
Log.d(TAG, "Unexpected PlaybackException! Cause: " + stackTrace);
if (trackSelector.getParameters().tunnelingEnabled
&& Log.getStackTraceString(error.getCause())
.contains("Surface")) {
&& stackTrace.contains("Surface")) {
trackSelector.setParameters(trackSelector.buildUponParameters()
.setTunnelingEnabled(false));
// Reload playback on unexpected errors:
setRecovery();
reloadPlayQueueManager();
break;
} else {
Log.d(TAG, "Conditinns for recovery not met. Tunneling enabled?: "
+ trackSelector.getParameters().tunnelingEnabled
+ ", Surface keyword found?: " + stackTrace.contains("Surface"));
}
// fall through to default
default:

0 comments on commit 803a0c6

Please sign in to comment.