title: react-native insert youtube video
body: <p>I am trying to insert youtube video to my react-native project. I added- react-native-video library, then this code:</p>
  
  <pre><code>import React, { Component } from 'react';
  import {
  AppRegistry,
      StyleSheet,
   Text,
  View,
  Video
  } from 'react-native';
  
  export default class video extends Component {
  render() {
  return (
    &lt;Video source={{uri: "Gladiator trailer.mp4"}}
     ref={(ref) =&gt; {
       this.player = ref
     }}                             // Store reference
     rate={1.0}                     // 0 is paused, 1 is normal.
     volume={1.0}                   // 0 is muted, 1 is normal.
     muted={false}                  // Mutes the audio entirely.
     paused={false}                 // Pauses playback entirely.
     resizeMode="cover"             // Fill the whole screen at aspect ratio.
     repeat={true}                  // Repeat forever.
     playInBackground={false}       // Audio continues to play when app entering background.
     playWhenInactive={false}       // [iOS] Video continues to play when control or notification center are shown.
     progressUpdateInterval={250.0} // [iOS] Interval to fire onProgress (default to ~250ms)
     onLoadStart={this.loadStart}   // Callback when video starts to load
     onLoad={this.setDuration}      // Callback when video loads
     onProgress={this.setTime}      // Callback every ~250ms with currentTime
     onEnd={this.onEnd}             // Callback when playback finishes
     onError={this.videoError}      // Callback when video cannot be loaded
     style={styles.backgroundVideo} /&gt;
  
  
  
  );
      }
   }
  
   const styles = StyleSheet.create({
    backgroundVideo: {
     position: 'absolute',
     top: 0,
      left: 0,
      bottom: 0,
      right: 0,
    }
    });
  
    AppRegistry.registerComponent('video', () =&gt; video);
  </code></pre>
  
  <p>I am receiving this error: element type is invalid: expected a string (for build-in components) or a class/function (for composite components) but got: undefined. Check the render method of 'video'.</p>