WKWebView does not play video in landscape mode only in iOS 10

Rotating the device does not rotate the currently playing video. It works great on iOS 8 and 9.

Cannot find any changes in WebKit that might cause this behavior. I just create a WKWebView with regular settings.

Does anyone know what could be causing this?

+5
source share
1 answer

In AppDelegate

func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { if let presentedViewController = window?.rootViewController?.presentedViewController { let className = String(describing: type(of: presentedViewController)) if ["MPInlineVideoFullscreenViewController", "MPMoviePlayerViewController", "AVFullScreenViewController"].contains(className) { return UIInterfaceOrientationMask.allButUpsideDown } } return UIInterfaceOrientationMask.portrait } 
0
source

Source: https://habr.com/ru/post/1258322/


All Articles