UI breaks when exit fullscreen on landscape mode in an iframe video

Hello everyone!

We have this Ionic app with Cordova. The UI is breaking when exit fullscreen on landscape mode in an iframe video.

Steps to reproduce:

  1. Enter a video on fullscreen
  2. Rotate device to landscape
  3. Tap to exit video fullscreen
  4. Rotate device to portrait

UI is broken or it looks like it stayed on landscape mode.

As far as we have investigated, it is an iOS issue. In the mean time, we decided to lock landscape mode when enter fullscreen on videos playing on an iframe element.

We’ve tried following ideas around to lock the landscape video orientation when playing in fullscreen:

And none of them has worked for us.

We want the video to look like this:

That way we prevent the device to rotate and break the UI meanwhile Apple solves the UI issue.

Is there a way to lock the portrait mode when playing a video on fullscreen (landscape or portrait) mode?