0 Replies
      Latest reply on Nov 27, 2019 5:00 PM by JUN1OKAMURA
      JUN1OKAMURA Level 1 Level 1 (0 points)

        Hi

        I have wrote following Swift class code to fix AVPlayer orientation to the landscape right, to override native AVPlayerVirewController. It works fine to iPhone but does not work for iPad. Do I need something more specific to iPad in order to fix AVPlayer orientation?

         

        # Both iOS 13.2.3 and using Xcode11.2.1

        Thank you for your suggestion.

        Jun

         

        class CustomAVPlayerViewController: AVPlayerViewController {

            // orientation fixed to landscapeRight

            override var supportedInterfaceOrientations: UIInterfaceOrientationMask {

                return .landscapeRight

            }

        }