Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LonelyCpp/react-native-youtube-if…
Browse files Browse the repository at this point in the history
…rame
  • Loading branch information
LonelyCpp committed Apr 15, 2020
2 parents 736f203 + 300f79b commit 1a32c28
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions readme.md
Expand Up @@ -11,6 +11,7 @@ A wrapper of the Youtube IFrame player API build for react native.
- ✅ Supports multiple youtube player instances in a single page
- ✅ Fetch basic video metadata without API keys (uses oEmbed)
- ✅ Works on modals and overlay components
- ✅ Expo support

## Prerequisite

Expand All @@ -20,10 +21,15 @@ This package uses react-hooks and therefore will need **react-native `0.59` or a

## Installation

1. First install `react-native-webview`. [Instructions here](https://github.com/react-native-community/react-native-webview/blob/master/docs/Getting-Started.md)
1. First install `react-native-webview`.

- Bare React Native app - [Instructions](https://github.com/react-native-community/react-native-webview/blob/master/docs/Getting-Started.md)
- React Native version **`0.60` and above**, install the latest version of react-native-webview
- React Native version **below `0.60`**, react-native-webview version `6.11.1` is the last version that supports it.

- Expo Managed App - [Instructions](https://docs.expo.io/versions/latest/sdk/webview/)


- React Native version **`0.60` and above**, install the latest version of react-native-webview
- React Native version **below `0.60`**, react-native-webview version `6.11.1` is the last version that supports it.

2. Run - `npm install react-native-youtube-iframe`

Expand All @@ -44,7 +50,7 @@ const [playing, setPlaying] = useState(true);
width={400}
videoId={"AVAc1gYLZK0"}
play={playing}
onChangeState={event => console.log(event)}
onChangeState={event => console.log(event)}
onReady={() => console.log("ready")}
onError={e => console.log(e)}
onPlaybackQualityChange={q => console.log(q)}
Expand Down

0 comments on commit 1a32c28

Please sign in to comment.