Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black overlays when changing EMVideoView's parent's LayoutParams #91

Closed
Thijsiez opened this issue Feb 8, 2016 · 5 comments
Closed
Labels

Comments

@Thijsiez
Copy link

Thijsiez commented Feb 8, 2016

Hej there,

First of all, thank you so much for the amazing library, it has saved me a lot of time and I can't wait for 3.0!!
Unfortunately, 2.5.3 is giving me some problem that I can't seem to wrap my head around. For my application I have a resizing layout which has a EMVideoView as a child view. The parent's dimension is changed by switching the LayoutParams around. Now when the EMVideoView is instantiated, the parent's width is 1080 pixels and the forced to a 16:9 aspect ratio. When I change the LayoutParams to a smaller variant, for example 800 pixels wide, some weird black bar overlays appear on the EMVideoView, which didn't happen before with the standard Android VideoView. I have some screenshots here:

1080 pixels wide
1080

960 pixels wide
960

800 pixels wide
800

640 pixels wide
640

540 pixels wide (half width)
540

As you can see, the black overlay is exactly the amount of pixels that the EMVideoView is smaller than 1080 pixels wide, on each side. Therefore, when the EMVideoView is half as wide compared to when it was instantiated, the overlays are completely covering the video. Is there any way I could counter this or is this a bug in the library?

Thanks in advance!

@brianwernick
Copy link
Owner

Hmm, This is probably an issue with the shutters. What android version are you seeing this on (really I just want to know if this is an issue with the sizing with the ExoPlayer backing, or the VideoView backing)

@Thijsiez
Copy link
Author

Thijsiez commented Feb 8, 2016

I'm running this on a OnePlus One running Cyanogen OS 12.1.1 which is Android 5.1.1, so I'm guessing it's the ExoPlayer backing that's causing it. My app is min SDK 17 anyways so I don't think the VideoView backing is even used

@brianwernick
Copy link
Owner

OK, Thanks. I'm fairly certain I'm just missing a callback for when the view size changes that needs to inform shutters (or the videos surface) to resize.

@Thijsiez
Copy link
Author

Thijsiez commented Feb 8, 2016

If there's any info you need about my implementation or if I should test something, just let me know ;)

@brianwernick
Copy link
Owner

OK, this has been fixed in 3df369b and will be in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants