LonelyCpp / react-native-youtube-iframe

A wrapper of the Youtube-iframe API built for react native.
https://lonelycpp.github.io/react-native-youtube-iframe/
MIT License
607 stars 155 forks source link

The Player is not shown when the parent View is aligned to center #310

Closed choubari closed 1 year ago

choubari commented 1 year ago

When the parent view of the YouTubePlayer contains the style alignItems: 'center' , the player doesn't show anymore

Let's say we have a View (A) that contains a View (B) that contains the YouTubePlayer, even when the top level View A has alignItems: 'center', the player is not shown.

LonelyCpp commented 1 year ago

the player does not have default width. When the parent tells the player to align itself to center, the width gets set to 0, and the player will not be rendered.

It'll show up if you give it a valid width prop value