react-native-youtube-iframe icon indicating copy to clipboard operation
react-native-youtube-iframe copied to clipboard

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

Open pedralho opened this issue 3 years ago • 2 comments

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):

  • Device: Android
  • OS + version: Android 8.0.0
  • react-native-youtube-iframe 2.1.2
  • react-native-webview 11.6.2
  • Expo verison 42.0.0

Additional context Add any other context about the problem here.

pedralho avatar Nov 22 '21 02:11 pedralho

Hi, Did you find any solution?

mrshahzeb7 avatar Dec 07 '21 19:12 mrshahzeb7

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

palashkulsh avatar Apr 19 '24 19:04 palashkulsh