Android Question Video player: about to give up... any help please?

wimpie3

Well-Known Member
Licensed User
Longtime User
I've been struggling with something that seems SO simple for SUCH a long time, I really don't know what to do anymore to get this thing working.

My requirement is to show a video in portrait mode. Seems easy. I've created a 640x800 video, put a videoview on a portrait activity and hey, fantastic, this works! But... not on all machines!

The problem is that some implementations of videoview (which is in fact the native video player) are locked in landscape mode. This means that my PORTRAIT activity shows my buttons and labels in PORTRAIT, which is fine, but the video underneath is shown in LANDSCAPE.

If I only could detect a way to see how the video was displayed, I could easily hide the video player when I know the display isn't right. It's a hack, but ok, I can live with that. Unfortunately, there is NO way to know how the video is displayed. Next idea: I though of using GetPixel to see if a certain pixel was displayed on a certain location and use this logic to detect the orientation of the video, but since videoview uses some kind of hardware acceleration, taking a screenshot returns a bunch of black pixels where the video should be.

Other solutions I've tried are: switching to animated gifs (file size too big and frame rate too low), using vitaminio (would be a great solution but there is no way I can afford a license) and webview HTML5 (has its own problems because not every platform has the same webview installed).

I know this isn't really B4A's fault, but something THIS trivial??? Come on! Is there someone with new ideas to help me out here?
 

moster67

Expert
Licensed User
Longtime User
I am working on an alternative FFMPEG-library. Should be released here in the forum in the next days.
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
Can views be added on top of the FFMPEG layer, like with videoview? That would be awesome news!!
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
it is a videoview wrapper so it should work fine...
 
Upvote 0
Top