Android Question videoviewplus video width


Active Member
Licensed User

@moster67 or others users, have your notice some errors with the returned video width from videoviewplus library ?

Could fix the problem ?

(i'm using videoviewplus library and searching a way to center the video, but the returned width seems to be wrong).

Video sample here :étang-l-eau-612

Many thanks.


Licensed User
Longtime User
I am unsure what your problem is. If it is about centering the videoview, you could try the following code in your Prepared event:

Sub CenterVideoView

    If GetDeviceLayoutValues.Width < GetDeviceLayoutValues.Height Then 'portrait
            vvvit5.Top = (100%y - vvvit5.Height) / 2
    Else if GetDeviceLayoutValues.Width > GetDeviceLayoutValues.Height Then 'landscape
          vvvit5.Left = (100%x - vvvit5.Width) / 2
        vvvit5.Top = (100%y - vvvit5.Height) / 2
    End If

End Sub

where vvvit5 is your VideoView object.

If you need to work with real the dimensions of the video, you could try the B4ATextureVideoView wrapper here:
Upvote 0