react-video-chapters

1.0.3 • Public • Published

react-video-chapters

Made with create-react-library

NPM JavaScript Style Guide

This is a HTML 5 video component with WebVTT Chapters and Subtitles support made for React.

Screenshot

alt text

Install

npm install --save react-video-chapters

Usage

import React, { Component } from 'react'

import ReactVideoChapters from 'react-video-chapters'
import 'react-video-chapters/dist/index.css'

class Example extends Component {
  render() {
    const subtitles = [
      {
        url: '/subtitleEnglish.vtt',
        srcLang: 'en-US',
        label: 'English',
        default: true
      },
      {
        url: '/subtitlePortuguese.vtt',
        srcLang: 'pt-BR',
        label: 'Portuguese'
      }
    ]

    return (
      <ReactVideoChapters
        url='/videoFile.mp4'
        webvttChaptersUrl='/chapterFile.vtt'
        style={{ maxWidth: '1080px' }}
        subtitles={subtitles}
      />
    )
  }
}

License

MIT © rogersampaio

Readme

Keywords

none

Package Sidebar

Install

npm i react-video-chapters

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

273 kB

Total Files

7

Last publish

Collaborators

  • rogersampaio