Skip to content

Commit

Permalink
Fix bug where PlayerView distorts video when video size is unknown
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 541640959
  • Loading branch information
marcbaechinger committed Jun 19, 2023
1 parent 949e9cb commit 8d8c514
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,8 @@ public void onCues(CueGroup cueGroup) {
@Override
public void onVideoSizeChanged(VideoSize videoSize) {
if (videoSize.equals(VideoSize.UNKNOWN)
&& (player == null || player.getPlaybackState() == Player.STATE_IDLE)) {
|| player == null
|| player.getPlaybackState() == Player.STATE_IDLE) {
return;
}
updateAspectRatio();
Expand Down

0 comments on commit 8d8c514

Please sign in to comment.