fix(android): bad rotation handling (#4205)

This commit is contained in:
Olivier Bouillet
2024-09-29 20:48:44 +02:00
committed by GitHub
parent 0c6b47f42c
commit 3ecf324bb3
2 changed files with 5 additions and 0 deletions

View File

@@ -275,6 +275,7 @@ public final class ExoPlayerView extends FrameLayout implements AdViewProvider {
case 90:
case 270:
layout.setVideoAspectRatio(format.width == 0 ? 1 : (format.height * format.pixelWidthHeightRatio) / format.width);
break;
default:
layout.setVideoAspectRatio(format.height == 0 ? 1 : (format.width * format.pixelWidthHeightRatio) / format.height);
}