Setup React Native Video for iOS and Android

Jason Brown
InstructorJason Brown
Share this video with your friends

Social Share Links

Send Tweet
Published 7 years ago
Updated 5 years ago

In this lesson we'll install react-native-video with NPM. We'll use the react- native link command to setup all necessary native code. Then we'll import Video from react-native-video and use the <Video/> component in our code!

To set up react native video for our react native project we first need to install it from npm. We'll type npm install react-native-video --save.

Once that is complete, we'll also need to link up the native pieces of the code. We can use that using the react-native CLI and type link, which'll now automatically link up all the Android code and all the OIS code that we need for react native video to work.

Now that we have it linked we can go ahead and import it and use it like any other react native component. We type importVideo from react-native-video and use it as a video component.

Christopher
Christopher
~ 6 years ago

What's the difference between this two-step process and "react-native install react-native-video"?

Creeland Provinsal
Creeland Provinsal
~ 5 years ago

In case anyone else was struggling with setting this up I made this starter. The README is a react-native setup guide. https://github.com/eggheadio-projects/react-native-video

Markdown supported.
Become a member to join the discussionEnroll Today