0.3.1 • Published 3 years ago
rn-exoplayer v0.3.1
Android React native ExoPlayer
An Android React native video player that uses ExoPlayer behind the scenes.
How to install
yarn add rn-exoplayeror
npm install rn-exoplayerlocate the build.gradle ( Project ) file and add
ext {
kotlin_version = '1.7.0' <--- add this line
...Locate your android sdk path by creating a local.properties file in the root folder of android folder and insert this line:
Windows OS
sdk.dir=C\:\\Users\\<username>\\AppData\\Local\\Android\\SdkMacOs
sdk.dir=/Users/<username>/Library/Android/sdkRun your app
npx react-native run-androidImplementation
<RnExoplayerView
url={url}
isPlaying
style={{
width: 300,
height: 300,
}}
/>Props
| Prop name | type | description |
|---|---|---|
| url | string | The media url |
| style | ViewStyle | style properties |
| isPlaying | boolean | determines whether the video is playing or not |
| repeat | boolean | determines if the video is in loop mode or not |
| destroyOnPause | boolean | Suspend the player when the video is paused |
| useNativeControls | boolean | Showing up native video controls |
| muted | boolean | determines whether the video is muted or not |