1.1.0 • Published 2 years ago

react-native-video-player-custom-ui v1.1.0

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

react-native-video-player-custom-ui

A react native component that lets you create custom ui for video player.

Installation

Run npm install react-native-video-player-custom-ui in your project directory.

Note: This package needs peer dependency of react-native-video please install and configure before you proceed.

Usage

This snippet would produce the output shown in the above gif

import React, { Component } from 'react';
import CustomVideoPlayer from 'react-native-video-player-custom-ui';

const Test = (props: any) => {
  return (
      <CustomVideoPlayer uri={"YOUR_VIDEO_URL"}/>
  )
}

Props

PropTypeOptionalDefaultDescription
uristringNonullsupports video url and storage url
playbooleanyesfalsehandles playback
widthnumberstringYes100%width of the player
heightnumberstringYes30%height of the player
autoplaybooleanyesfalsehandles autoplay
loopbooleanyesfalsevideo will play continously
playIconnumberyesimagecustom icon for play
pauseIconnumberyesimagecustom icon for pause
replayIconnumberyesimagecustom icon for replay
themestringyeswhiteplayer color theme
radiusnumberyes10border radius for player
controlsbooleanyestrueshow/hide controls
seekBarWidthnumberstringYes80%width of the seekbar
seekBarFilledColorstringyeswhiteseek bar finished color
seekBarUnfilledColorstringyeswhiteseek bar unfinished color
thumbStyleobjectyesseekbar thumb style
resizeModestringyescontainplayer resize mode
onCompletefunctionyestriggers on video completion
onReplayfunctionyestriggers on replay

Contributing

If you find a bug just open a PR or an issue and ping me!