1.0.6 • Published 6 months ago

react-native-video-subtitle v1.0.6

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

React Native Video Subtitle

Add subtitle and translation to any video given a current timestamp or by your own timer.

Table of Contents

Installation

# Run with yarn
yarn add react-native-video-subtitle

# or Run with NPM
npm i react-native-video-subtitle

Usage

import SubtitlePlayer from 'react-native-video-subtitle'

const Example = () => {
  return (
    <SubtitlePlayer
      currentTime={currentTime}
      subtitle={{
         uri :'subtitle.srt',
         translationUri:'translation.srt'
      }}
    />
  )
}

Props

PropDescriptionDefaultrequired
currentTimeuses current time in seconds from react-native-video package or your timerNonetrue
subtitleAn object with the file property containing the url. You can also add another properties to this object, like translationUri to append translation subtitleNonetrue
styleSet custom style for container{}false
textStyleGeneral style for subtitleTextStyle and translationTextStyle{}false
subtitleTextStyleCustom style for subtitle text{}false
translationTextStyleCustom style for translation text{}false
adjustsFontSizeToFitSpecifies the smallest possible scale a font can reach when adjustsFontSizeToFit is enabledtruefalse
disableSubtitleTo disable and hide subtitle textfalsefalse
disableTranslationTo disable and hide translation textfalsefalse
positionset position for subtitle container which can be top or bottombottomfalse

License

This project is licenced under the Learnova Team.

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago