codinger41 / react-native-video-component

Simple video player component with easy, slick controls.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PRs Welcome

React Native Video Component (Android/iOS)

If this project has helped you out, please support us with a star 🌟

This library is a simple react native video component that saves you the time of building video controls. It also support multiple videos and video captions!

πŸ“– Getting started

$ npm install react-native-video-component --save
$ npm install react-native-video --save
$ react-native link react-native-video

Usage

import VideoPlayer from 'react-native-video-component'

const renderPlayer = (props) => {
  return (
    <VideoPlayer
      videos={videos} // use `video` for one video and `videos` if you have an array of videos.
      videoStyle={styles.videoStyle} // Usual style object, video style
      videoContainerStyle={styles.videoContainer} // Usual view style object
      caption={'interesting animal videos'} // Text, can be the description of the video
      captionStyle={styles.captionStyle} // Usual text style object to style the caption
      hideControlsTimeOut={10000} // time (in seconds) it takes before control hides
      // all other props for the <Video/> component
    />
  )
}

✨ Credits

πŸ€” How to contribute

Have an idea? Found a bug? Please raise to ISSUES. Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.

  • If you're feeling especially charitable, please follow leksyib on GitHub.
  • Thanks!

About

Simple video player component with easy, slick controls.


Languages

Language:JavaScript 56.6%Language:Objective-C 23.8%Language:Python 10.5%Language:Java 9.1%