1.0.1 • Published 2 years ago

expo-instagram-reels v1.0.1

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

Expo Instagram Reels

It provides a component that allows you to display a list of reels similar to the Instagram app.

Features

  • List of videos
  • Seekable videos
  • Play/Pause option
  • Fully customizable

✨ App Preview

Video Preview

Installation

Just run the below command in your project folder

Note:- This runs only in an Expo Managed and Bare(expo) project and not in React Native CLI project.

To install,

npm install --save expo-instagram-reels

Usage

import Reels from 'expo-instagram-reels';

...

// Pass the array of objects with _id and uri as props
<Reels videos={videos} />

Parameters

Required Parameters

ParameterrequiredDefaultDescription
videosYES[]List of videos for reels

Container Parameters

ParameterrequiredDefaultDescription
backgroundColorNOblackBackground color of the whole container

Header Parameters

ParameterrequiredDefaultDescription
headerTitleNO"Reels"Title to be shown on the top header bar
headerIconNameNOarrowrighticonName from AntDesign family
headerIconColorNOwhiteicon color for the header bar
headerIconSizeNO24icon size for the header bar
headerIconNOnullCustom icon component to display
headerComponentNOnullcustom component to show instead of header bar
onHeaderIconPressNOnullfunction to execute when user presses the back icon in the header Bar

Button Options Parameters

ParameterrequiredDefaultDescription
optionsComponentNOnullA custom component to show instead of default options such as like, comment etc.
pauseOnOptionsShowNOtrueWhether to pause the playback when user touches the scren or not
onSharePressNOnullFunction to execute when user presses the share button. Gives _id in props
onCommentPressNOnullFunction to execute when user presses the comment button. Gives _id in props
onLikePressNOnullFunction to execute when user presses the like button. Gives _id in props
onDislikePressNOnullFunction to execute when user presses the dislike button. Gives _id in props

Video Player Parameters

ParameterrequiredDefaultDescription
onFinishPlayingNOnullFunction to execute on every video finish

Slider component Parameters

ParameterrequiredDefaultDescription
minimumTrackTintColorNOnullThe color used for the track to the left of the button.
maximumTrackTintColorNOnullThe color used for the track to the right of the button.
thumbTintColorNOnullColor of the foreground switch grip.

Time display Parameters

ParameterrequiredDefaultDescription
timeElapsedColorNO"grey"Color of the timestamp which shows total time that has been elapsed since the video started playing
totalTimeColorNO"grey"Color of the timestamp which shows total duration of the clip