Hi,
I am using a videoview filling the entire activity to play video, but when the video orientation (portrait or landscape) do not match the screen orientation, it plays on one side, and not centered.
There is an obvious solution: to set the videoview position and dimensions according to the video orientation and centered in the screen, but in order to do this, i would need to know which is the video orientation. MediaBrowser is of no help, because the Resolution property is always 1920x1080 for whichever orientation (it would have helped if it said 1080x1920 when in portrait mode, but it's not the case).
I found this method http://developer.android.com/reference/android/media/MediaMetadataRetriever.html to retrieve the metadata of a video file, but I don't know how to do it in B4A, maybe using a reflector, os some library?
Thanks in advance.
I am using a videoview filling the entire activity to play video, but when the video orientation (portrait or landscape) do not match the screen orientation, it plays on one side, and not centered.
There is an obvious solution: to set the videoview position and dimensions according to the video orientation and centered in the screen, but in order to do this, i would need to know which is the video orientation. MediaBrowser is of no help, because the Resolution property is always 1920x1080 for whichever orientation (it would have helped if it said 1080x1920 when in portrait mode, but it's not the case).
I found this method http://developer.android.com/reference/android/media/MediaMetadataRetriever.html to retrieve the metadata of a video file, but I don't know how to do it in B4A, maybe using a reflector, os some library?
Thanks in advance.