Answers for "react native youtube video"

3

insert youtube video in react native app

npm install --save react-native-video
Posted by: Guest on July-31-2021
1

insert youtube video in react native app

// Load the module

import Video from 'react-native-video';

// Within your render function, assuming you have a file called
// "background.mp4" in your project. You can include multiple videos
// on a single screen if you like.

<Video source={{uri: "background"}}   // Can be a URL or a local file.
       ref={(ref) => {
         this.player = ref
       }}                                      // Store reference
       onBuffer={this.onBuffer}                // Callback when remote video is buffering
       onError={this.videoError}               // Callback when video cannot be loaded
       style={styles.backgroundVideo} />

// Later on in your styles..
var styles = StyleSheet.create({
  backgroundVideo: {
    position: 'absolute',
    top: 0,
    left: 0,
    bottom: 0,
    right: 0,
  },
});
Posted by: Guest on July-31-2021
0

youtube video player react native

import React from 'react';
import {View} from 'react-native';
import YoutubePlayer from 'react-native-youtube-iframe';

const App = () => {

  return (
    <View>
      <YoutubePlayer
        height={300}
        play={true}
        videoId={'84WIaK3bl_s'}
      />
    </View>
  );
};
Posted by: Guest on July-31-2021
0

youtube video player react native

npm install react-native-webview
npm install react-native-youtube-iframe
Posted by: Guest on July-31-2021

Code answers related to "react native youtube video"

Code answers related to "Javascript"

Browse Popular Code Answers by Language