We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7101aec commit 465979eCopy full SHA for 465979e
1 file changed
app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java
@@ -1554,6 +1554,11 @@ void onResizeClicked() {
1554
@Override
1555
public void onVideoSizeChanged(@NonNull final VideoSize videoSize) {
1556
super.onVideoSizeChanged(videoSize);
1557
+ // Starting with ExoPlayer 2.19.0, the VideoSize will report a width and height of 0
1558
+ // if the renderer is disabled. In that case, we skip updating the aspect ratio.
1559
+ if (videoSize.width == 0 || videoSize.height == 0) {
1560
+ return;
1561
+ }
1562
binding.surfaceView.setAspectRatio(((float) videoSize.width) / videoSize.height);
1563
}
1564
//endregion
0 commit comments