react-native-webview-video

0.4.7 • Public • Published

React Native Webview Video

React Native library that provides a Video component that renders media content such as videos with custom controls for react-native and react-native-web. Support Youtube and Vimeo.

When use react-native-web please guild setup in https://www.npmjs.com/package/@chainplatform/react-native-web-webview

PRs welcome! Follow @doansan

Install

npm install react-native-webview-video --save

or

yarn add react-native-webview-video

Usage

Note: Set useRemote={true} if export web as mini app.

import React from 'react';
import {StyleSheet} from 'react-native';
import Video from 'react-native-webview-video';

class App extends React.Component {

  render() {
    return (
      <View style={{flex:1}}>
          <Video
            videoId={"wJ1rCGK06bk"}
            videoType={"youtube"}
            useRemote={false}
            poster={"https://i.imgur.com/jsaRvR3.png"}
          />
      </View>
    );
  }
}

Package Sidebar

Install

npm i react-native-webview-video

Weekly Downloads

449

Version

0.4.7

License

MIT

Unpacked Size

83.4 kB

Total Files

21

Last publish

Collaborators

  • chainplatform