Skip to content

Commit e53796f

Browse files
Fix bug where PlayerView distorts video when video size is unknown
PiperOrigin-RevId: 541640959 (cherry picked from commit 8d8c514)
1 parent 3631e1c commit e53796f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/ui/src/main/java/androidx/media3/ui/PlayerView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,8 @@ public void onCues(CueGroup cueGroup) {
16031603
@Override
16041604
public void onVideoSizeChanged(VideoSize videoSize) {
16051605
if (videoSize.equals(VideoSize.UNKNOWN)
1606-
&& (player == null || player.getPlaybackState() == Player.STATE_IDLE)) {
1606+
|| player == null
1607+
|| player.getPlaybackState() == Player.STATE_IDLE) {
16071608
return;
16081609
}
16091610
updateAspectRatio();

0 commit comments

Comments
 (0)