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

<video> has a lot of padding around it #264

Closed
MilosKarakas opened this issue Apr 17, 2020 · 6 comments
Closed

<video> has a lot of padding around it #264

MilosKarakas opened this issue Apr 17, 2020 · 6 comments

Comments

@MilosKarakas
Copy link

Hi, i wanted to use your package to render <iframe> and

image

After investigating your package I found out that the chewie package, responsible for showing video tag, is not working properly. It uses aspectRatio for video preview widget size while the whole tag size remains at the same size as it is extracted from the html string, leaving a lot of space before and after the tag. I managed to get around it myself by adjust the chewie package, but it is not a proper solution at all since I would need this for an official project, Is it possible that you set the size that is given for the whole tag be the same as the size that chewie video player takes?

@Sub6Resources
Copy link
Owner

That is odd. I'll look into it.

@MilosKarakas
Copy link
Author

@Sub6Resources thanks, looking forward to it.

@DocMarty84
Copy link
Contributor

@MilosKarakas

Hello,

Would you mind sharing your workaround?

Thanks

DocMarty84 added a commit to DocMarty84/flutter_html that referenced this issue May 9, 2020
The `ChewieController` doesn't use the aspect ratio from the container,
leading to incorrect padding around the element.

Fixes Sub6Resources#264
@MilosKarakas
Copy link
Author

Hey @DocMarty84 I just adjusted the controller to take the width and height of the element and calculate the ratio from that. I don't have the code at the moment, but it seems like your fix should work.

@DocMarty84
Copy link
Contributor

Hey @DocMarty84 I just adjusted the controller to take the width and height of the element and calculate the ratio from that. I don't have the code at the moment, but it seems like your fix should work.

Indeed, it seems working fine in all the cases I faced. For now I'll use it in my project, but hopefully it will be fixed soon.

Thanks!

@MilosKarakas
Copy link
Author

@DocMarty84 thank you for contributing. Hopefully it gets merged soon.

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

No branches or pull requests

3 participants