0.1.3 • Published 3 years ago

react-subtitles v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

NPM [JavaScript Style Guide](https://standardjs.com

Install

npm install --save react-subtitles
  #or
yarn add react-subtitles

Usage

import React from 'react'

import useSubtitles from 'react-subtitles'

export default function App() {

   const subtitlesUrl = "https://gist.githubusercontent.com/samdutton/ca37f3adaf4e23679957b8083e061177/raw/e19399fbccbc069a2af4266e5120ae6bad62699a/sample.vtt"

  const [subtitle] = useSubtitles({subtitles:subtitlesUrl})
  return(
    <>
      {subtitle.map(s => <h1>{s.text}</h1>)}
    </>
  )
}

License

MIT © Leandro-Goncalves

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago