Closed mauricegavin closed 7 years ago
Library does nothing with layout dimensions. So it's not a problem with library itself.
One thing I noticed you compared the behaviour between frame-video-view (which highly likely uses TextureView
) and VideoView
.
I'm guessing you will get the same output for your test if you do:
<TextureView
android:id="@+id/photo_instruction_video_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"/>
or
by setting:
frameVideoView.setImpl(ImplType.VIDEO_VIEW)
to force frame-video-view to use VideoView
.
I've used FrameVideoView in my application but I'm having difficulty getting it to scale on different screen sizes. With the stock VideoView class I set layout_height = wrap_content, however, if I do this with FrameVideoView it fills the entire screen.
Do you have any idea advice as to how I could get FrameVideoView to resize to the content so as to preserve the aspect ratio on different screen sizes?
Below is my implementation of the respective views. They sit inside a RelativeLayout, hence the layout_gravity.
Love the library, slick solution to the flickering problem.