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
(cherry picked from commit 3f991f6)
  • Loading branch information
marcbaechinger committed Jun 26, 2023
1 parent 0b9a3db commit 129a3d2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,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 129a3d2

Please sign in to comment.