Hi guys
Please have a look at this snack:
https://snack.expo.io/@yolpsoftware/groaning-nachos
Please open the snack in a separate window (link to the right of the “Web” tab in the right sidebar).
When you resize the window a bit, you’ll notice some strange behavior:
- (might be an error in Snack) When the window is big enough for the two videos to fit in, their parents get a height of 0, so they are rendered on top of each other. As soon as you make the window smaller, this behavior disappears.
- Even though both the
<Video>
and their direct parents havewidth: 100%
andaspectRatio: 1.333
, the height of the<Video>
elements always stays the same. TheaspectRatio
prop is not respected.
Why is that so?
I want the video elements to fill the width of their parent, but their height should be set according to the aspectRatio
prop.
SDK Version: 39
Platforms(Android/iOS/web/all): web / iOS (Android not tested)