1import { WebView } from 'react-native-webview';
2<WebView
3 source={{html: '<iframe width="100%" height="50%" src="https://www.youtube.com/embed/cqyziA30whE" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>'}}
4 style={{marginTop: 20}}
5/>
6
1import React from 'react';
2import {View} from 'react-native';
3import YoutubePlayer from 'react-native-youtube-iframe';
4
5const App = () => {
6
7 return (
8 <View>
9 <YoutubePlayer
10 height={300}
11 play={true}
12 videoId={'84WIaK3bl_s'}
13 />
14 </View>
15 );
16};