cordova-plugin-videoplayer icon indicating copy to clipboard operation
cordova-plugin-videoplayer copied to clipboard

Set oriantion

Open Ross-Rawlins opened this issue 6 years ago • 2 comments

My app is locked into portrait mode but the video is landscaped how can I set this fix in the play options?

Ross-Rawlins avatar Mar 22 '18 09:03 Ross-Rawlins

Facing the same issue. How to correct this? Looks bad in the app.

shyaaam avatar Jun 21 '18 13:06 shyaaam

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');
    
});

kiweb avatar Jun 22 '18 00:06 kiweb