2
votes

I have created an app using Ionic 3, and it's forced to be portrait only.

In the app there are lots of videos, some which play inline, others which play fullscreen. I'm using Videogular (http://www.videogular.com/).

My question is, on Android, is it possible to force landscape when playing a fullscreen video, whilst keeping the rest of the app portrait? On iOS when the video plays fullscreen with the native player, the user's free to rotate their device as they want, but on Android it's locked to playing in portrait.

I'm very new to app development, so I apologise in advance if this is a stupid question!

Thanks in advance

1
Set the orientation of the activity when playing the video?Zoe

1 Answers

0
votes

I've settled with manually switching the orientation lock to landscape when a video is played, and switching it back upon leaving the fullscreen video.

this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);

&

this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);