GithubHelp home page GithubHelp logo

khayym / react-native-video Goto Github PK

View Code? Open in Web Editor NEW

This project forked from react-native-video/react-native-video

0.0 0.0 0.0 15.94 MB

A <Video /> component for react-native

License: MIT License

Shell 0.29% Ruby 0.39% C++ 5.06% C 0.18% Objective-C 3.61% Java 40.79% Kotlin 2.81% TypeScript 11.41% Swift 35.47%

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

Supported by

๐Ÿ“ฑ TWG provides both free and commercial support for this project. Feel free to contact us ๐Ÿค to build something awesome together! ๐Ÿš€

TheWidlarzGroup

react-native-video's People

Contributors

cobarx avatar freeboub avatar hueniverse avatar brentvatne avatar krzysztofmoch avatar isair avatar sjchmiela avatar armands-malejevs avatar n1ru4l avatar changete 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 duell10111 avatar johanneslumpe avatar nickfujita avatar emrahdk avatar lrusso avatar evoactivity 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.