1.6.0 • Published 8 months ago

react-native-awesome-player v1.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

React native awesome player

React native awesome player for video

Sample codes here

Installation

npm i react-native-awesome-player
yarn add react-native-awesome-player
import { VideoPlayer } from "react-native-awesome-player";

<VideoPlayer
  title={"Sample video"}
  radius={10}
  width={360}
  height={240}
  autoplay={true}
  src={
    "https://cdn.videvo.net/videvo_files/video/premium/getty_124/large_watermarked/istock-950718922_preview.mp4"
  }
  poster={
    "https://images.unsplash.com/photo-1516026672322-bc52d61a55d5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTB8fHN1bnNldCUyMGFmcmljYXxlbnwwfHwwfHx8MA%3D%3D&auto=format&fit=crop&w=200&q=60"
  }
  hideNavbar={false}
  hideControls={false}
  resizeMode="contain"
  libraryText="Episodes"
/>;

VideoPlayer Properties

PropertyTypeDefaultRequired
srcstringundefinedYes
posterstringundefinedOptional
widthnumberundefinedYes
heightnumberundefinedYes
radiusnumberundefinedYes
backgroundColorstring#000Optional
progressColorstring#3f3f3fOptional
resizeModestringcontainOptional
autoplaybooleanfalseOptional
hideControlsbooleanfalseOptional
hideNavbarbooleanfalseOptional
backHandlerfunctionundefinedOptional
backIconstringchevron-back (react-native-vector-icons(ionicons))Optional
showLibrarybooleanfalseOptional
libraryArray<{title: string; video: string; poster: string}>[]Optional
libraryTextstringEpisodesOptional
autoplaybooleanfalseOptional

action Properties

PropertyTypeDefaultDescription
playfunctionundefinedPlay action
pausefunctionundefinedPause action

playStatus Properties

PropertyTypeDefaultDescription
isPlayingbooleanfalseVideo is playing
isBufferingbooleanfalseVideo is buffering
didJustFinishbooleanfalseVideo just ended
positionMillisnumber0Video current position in milliseconds
durationMillisnumber0Video duration in milliseconds

Maintainers

@kimolalekan