0.1.3 • Published 5 years ago

react-video-controls v0.1.3

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

react-video-controls

Gives video controller components to use with HTML5 videos

NPM JavaScript Style Guide

Install

npm install --save react-video

Usage

import React from 'react'
import VideoProvider, {
  VideoCtx,
  Mute,
  Play,
  Pause,
  Unmute,
  Fullscreen,
  SeekBar,
} from 'react-video'

function Video() {
  return (
    <VideoProvider>
      <VideoCtx.Consumer>
        {({ video, state }) => (
          <div>
            {video}
            <SeekBar />
            <Play>Play</Play>
            <Pause>Pause</Pause>
            {state.formatted.time} / {state.formatted.duration}
            <Mute>Mute</Mute>
            <Unmute>Un-Mute</Unmute>
            <Fullscreen>FullScreen</Fullscreen>
          </div>
        )}
      </VideoCtx.Consumer>
    </VideoProvider>
  )
}

License

MIT © tylermcrobert

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.0

5 years ago