0.1.3 • Published 7 years ago

react-native-video-player-somecourse v0.1.3

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

React Native Video Player

A React Native video player with a few controls. This player uses react-native-video for the video playback.

demo gif

Installation

npm install --save react-native-video-player
react-native link react-native-video
react-native link react-native-vector-icons

Props

PropDescription
videoThe video source to pass to react-native-video.
thumbnailAn Image source to use as thumbnail before the video gets loaded.
videoWidthWidth of the video to calculate the player size.
videoHeightHeight of the video to calculate the player size.
durationDuration can not always be figured out (e.g. when using hls), this can be used as fallback.
autoplayStart the video automatically.
defaultMutedStart the video muted, but allow toggling.
mutedStart the video muted and hide the mute toggle button.
controlsTimeoutTimeout when to hide the controls.
disableControlsAutoHideDisable auto hiding the controls.
loopLoop the video after playback is done.
resizeModeThe video's resizeMode. defaults to contain and is passed to react-native-video.
hideControlsOnStartHides the controls on start video.
endWithThumbnailReturns to the thumbnail after the video ends.
customStylesThe player can be customized with these custom styles:

All other props are passed to the react-native-video component.

customStyles

  • wrapper
  • video
  • controls
  • playControl
  • controlButton
  • controlIcon
  • playIcon
  • seekBar
  • seekBarFullWidth
  • seekBarProgress
  • seekBarKnob
  • seekBarBackground
  • thumbnail
  • playButton
  • playArrow
  • videoWrapper

Future features

  • Make seek bar seekable.
  • Make player customizable.
  • Add volume control
  • Add fullscreen button
    • Add fullscreen button for android
  • Add loader