HTML5 portrait video in full screen in cordova app stretched on Android devices

When I play a video shot in landscape orientation on my Android device and enter full screen mode, the device remains in portrait mode and terribly stretches the video.

Is there a way to make the video not stretch in portrait mode when entering full screen mode? But stay in landscape orientation and have black borders above and below.

Normal aspect ratio

Stretched in portrait mode

      <video class="media-video" 
  video-directive item="$ctrl.item" 
  ng-src="{{$ctrl.item.videoUrl | trustUrl}}" 
  preload="auto" 
  controls
    poster="{{$ctrl.item.video.thumbnail_url}}">
    Your browser does not support the video tag.
  </video>
+4
source share
1 answer

I have a similar project that plays video in the cordova application in android, and my video does not stretch in full screen:

enter image description here

codova. . , CSS : 100%. - .

: https://github.com/Dammmien/Planete-cine/blob/master/src/js/directives/videoPlayer.js

+2

Source: https://habr.com/ru/post/1674207/


All Articles