We have this Ionic app with Cordova. The UI is breaking when exit fullscreen on landscape mode in an iframe video.
Steps to reproduce:
- Enter a video on fullscreen
- Rotate device to landscape
- Tap to exit video fullscreen
- 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:
- Screen Orientation Plugin to Set/Lock on Android, iOS, or Windows
- angular - Ionic 3 - Screen Orientation Lock not working - Stack Overflow
- Screen orientation lock not working (eg. portrait-primary) if the device is locked in other orientation (eg. landscape-primary) but held in the first orientation (eg. portrait-primary) · Issue #82 · apache/cordova-plugin-screen-orientation · GitHub
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?