0

I want to play some YouTube videos in my react native app using a native player as we don't want to show youtube branding in the player. Is there any possible way to do this? If not, what's the best way to play youtube videos in react native app without showing youtube branding?

Sankar
  • 343
  • 2
  • 6
  • 18
  • Try this, [enter link description here](https://stackoverflow.com/questions/57413156/play-youtube-video-in-react-native-video) – Parth Godhani Sep 14 '22 at 06:14

1 Answers1

0

You can do this using react-native-webview.

  <WebView
    javaScriptEnabled={true}
    domStorageEnabled={true}
    scrollEnabled={false}
    source={{
      uri: `${"YOUR YOUTUBE URL"}?controls=0&showinfo=0&wmode=transparent&rel=0&mode=opaque`,
    }}
    style={{
      height: 200,
      width: Dimensions.get('window').width - 80,
    }}
    onError={(err) => {
      console.log(err, 'this is errr');
    }}
  />
ronak dholariya
  • 177
  • 1
  • 6