Commit 129a3d27 by bachinger Committed by Marc Baechinger

Fix bug where PlayerView distorts video when video size is unknown

PiperOrigin-RevId: 541640959
(cherry picked from commit 3f991f643c053d8cbd6d324de405fb7c96f3ce0d)
parent 0b9a3db7
......@@ -1571,7 +1571,8 @@ public class StyledPlayerView extends FrameLayout implements AdViewProvider {
@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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment