GithubHelp home page GithubHelp logo

avencat / react-native-video Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thewidlarzgroup/react-native-video

0.0 2.0 2.0 15.71 MB

A <Video /> component for react-native

Home Page: https://www.npmjs.com/package/react-native-video

License: MIT License

Java 41.98% Objective-C 3.76% Ruby 0.40% Swift 34.99% C++ 5.29% C 0.19% Kotlin 2.94% TypeScript 10.45%

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

Old version of documentation can be found here New 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!

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,
  },
});

react-native-video's People

Contributors

cobarx avatar freeboub avatar hueniverse avatar brentvatne avatar isair avatar sjchmiela avatar armands-malejevs avatar n1ru4l avatar changete avatar krzysztofmoch avatar ashnfb avatar avencat avatar jenshandersson avatar nickgzzjr avatar sridhardvvce avatar tironiigor avatar yungblud avatar wood1986 avatar thoblr avatar gabriel-rivero avatar mysport12 avatar olgunkaya avatar r0b0t3d avatar yavor87 avatar johanneslumpe avatar duell10111 avatar nickfujita avatar emrahdk avatar lrusso avatar evoactivity avatar

Watchers

James Cloos avatar  avatar

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.