GithubHelp home page GithubHelp logo

react-native-video / react-native-video Goto Github PK

View Code? Open in Web Editor NEW
7.0K 7.0K 2.8K 17.98 MB

A <Video /> component for react-native

License: MIT License

Objective-C 3.46% Java 40.94% Ruby 0.61% C++ 4.80% C 0.17% Swift 34.62% TypeScript 11.93% Kotlin 3.20% Shell 0.27%

react-native-video's Introduction

react-native-video

๐ŸŽฌ <Video> component for React Native

Note: version 5.2.1 won't have any updates. We are currently working on making a 6.0.0 fully stable

Documentation

documentation is available at react-native-video.github.io/react-native-video

if you find some issue with new version, don't hesitate to open a ticket! Also Old version can be found here

Usage

// Load the module

import Video, {VideoRef} 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.

const VideoPlayer = () => {
 const videoRef = useRef<VideoRef>(null);
 const background = require('./background.mp4');

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

// Later on in your styles..
var styles = StyleSheet.create({
  backgroundVideo: {
    position: 'absolute',
    top: 0,
    left: 0,
    bottom: 0,
    right: 0,
  },
});

Community support

We have an discord server where you can ask questions and get help. Join the discord server

Enterprise Support

๐Ÿ“ฑ react-native-video is provided as it is. For enterprise support or other business inquiries, please contact us ๐Ÿค. We can help you with the integration, customization and maintenance. We are providing both free and commercial support for this project. let's build something awesome together! ๐Ÿš€

TheWidlarzGroup

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.