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
603 stars 153 forks source link

It's not possible to rotate the video using the Transforms style properties from React Native #207

Open pedralho opened 2 years ago

pedralho commented 2 years ago

Describe the bug When one try to rotate the YoutubePlayer using the style below, it's just ignored and the video keeps in the original state.

style={{ transform: [{ rotateZ: '90deg' }] }}

To Reproduce

<YoutubePlayer
            style={{ transform: [{ rotateZ: '90deg' }] }}
            height={SCREEN_WIDTH}
            width={SCREEN_HEIGHT}
            videoId={VIDEO_ID}
/>

Expected behavior I expected to see the video being displayed in landscape, fitting the whole screen (keeping the aspect ratio).

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

mrshahzeb7 commented 2 years ago

Hi, Did you find any solution?

palashkulsh commented 4 months ago

for whoever is facing the issue, try adding the style in webViewProps. its working for me in android 10, react 0.73