Fix NPE in VideoPlayer error handler.
This commit is contained in:
parent
30a542234b
commit
38f6efbcae
1 changed files with 5 additions and 2 deletions
|
@ -117,9 +117,12 @@ public class VideoPlayer extends FrameLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerError(PlaybackException error) {
|
public void onPlayerError(@NonNull PlaybackException error) {
|
||||||
|
Log.w(TAG, "A player error occurred", error);
|
||||||
|
if (playerCallback != null) {
|
||||||
playerCallback.onError();
|
playerCallback.onError();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
exoView.setPlayer(exoPlayer);
|
exoView.setPlayer(exoPlayer);
|
||||||
exoControls.setPlayer(exoPlayer);
|
exoControls.setPlayer(exoPlayer);
|
||||||
|
|
Loading…
Add table
Reference in a new issue