LibVLC Android: Video not scaling to VLCVideoLayout size

Viewed 1702

I'm having a problem with the video output on a VLCVideoLayout.

Video plays fine, however it plays with its original size instead of fitting inside of the VLCVideoLayout.

Here's what I already attempted but failed:

ViewGroup.LayoutParams videoParams = videoLayout.getLayoutParams();
mMediaPlayer.getVLCVout().setWindowSize(videoParams.width, videoParams.height);

Here's part of my layout:

<org.videolan.libvlc.util.VLCVideoLayout
android:id="@+id/player"
android:layout_width="200dp"
android:layout_height="120dp"
android:fitsSystemWindows="false"/>

I'm using version 3.2.6

implementation 'org.videolan.android:libvlc-all:3.2.6'

The end result it's the crop of center part of the video (or a zoom on the center?).

This is a picture with the problem. The white part is the rest of the layout, on the center i have the VLCVideoLayout. The video has a lot more than what the VLCVideoLayout is showing. Sample of the problem

Anybody can help? Thanks.

0 Answers
Related