cordova-plugin-videoplayer
cordova-plugin-videoplayer copied to clipboard
Set oriantion
My app is locked into portrait mode but the video is landscaped how can I set this fix in the play options?
Facing the same issue. How to correct this? Looks bad in the app.
I found a workaround for this. Use cordova-plugin-screen-orientation
When the video is triggered, lock the screen orientation to landscape, play the video, and then lock the orientation back to portrait when the video is completed, or if there's an error.
window.screen.orientation.lock('landscape');
VideoPlayer.play(scope.url, {}, function() {
window.screen.orientation.lock('portrait');
}, function(err) {
window.screen.orientation.lock('portrait');
});