0.0.9 • Published 5 years ago

react-native-videoshare v0.0.9

Weekly downloads
-
License
-
Repository
-
Last release
5 years ago

react-native-videoshare

A react native component video share

License MIT NPM version

Installation

  • 1.Run npm i react-native-videoshare --save or yarn add react-native-videoshare
  • 2.import Story from 'react-native-story'

Getting started

Add react-native-videoshare to your js file.

import Videoshare from 'react-native-videoshare'

Inside your component's render method, use videoshare:

  state = {
    show: false
  };
  showVideo() {
    this.setState({ show: true });
  }
  hideVideo() {
    this.setState({ show: false });
  }


 render() {
  const { show } = this.state;
	return (
	 <View style={styles.container}>
      {!show ? (
        <Button onPress={() => this.showVideo()} title="show Videos" />
      ):false}
        {show ? (
        //   <Videoshare
        //     accessKey={"f3b52af5270398ec196068477f0d223716624af6"}
        //     playlistId={1}
        //     videoClose={true} // if video finish , it will close pop up
        //     hideVideo = {this.hideVideo.bind(this)}
        //   />
        <Videoshare
            accessKey={"f3b52af5270398ec196068477f0d223716624af6"}
            postId={1}
            videoClose={true} // if video finish , it will close pop up
            hideVideo = {this.hideVideo.bind(this)}
          />
        ) : (
          false
        )}
    </View>
 }

API

PropsTypeOptionalDefaultDescription
accessKeystringrequired-authorization key
hideVideofuncrequired-close the video component
postIdanytrue-only play single video
playlistIdstringtrue-play bunch of videos

MIT Licensed UE

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.0

5 years ago