When attempting to present an AVPlayerViewController
without animations, the video orientation does not function as expected. However, when the animation parameter is set to true
, the video orientation works correctly.
The following code does not produce the desired video orientation behavior when animation is disabled:
parentViewController.present(playerViewController, animated: false)
In contrast, the desired video orientation is achieved with animation enabled:
parentViewController.present(playerViewController, animated: true)