0.3.1 • Published 2 years ago

rn-exoplayer v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Android React native ExoPlayer

An Android React native video player that uses ExoPlayer behind the scenes.

How to install

yarn add rn-exoplayer

or

npm install rn-exoplayer

locate 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\\Sdk

MacOs

sdk.dir=/Users/<username>/Library/Android/sdk

Run your app

npx react-native run-android

Implementation

<RnExoplayerView
    url={url}
    isPlaying
    style={{
	  width: 300,
	  height: 300,
    }}
/>

Props

Prop nametypedescription
urlstringThe media url
styleViewStylestyle properties
isPlayingbooleandetermines whether the video is playing or not
repeatbooleandetermines if the video is in loop mode or not
destroyOnPausebooleanSuspend the player when the video is paused
useNativeControlsbooleanShowing up native video controls
mutedbooleandetermines whether the video is muted or not
0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago