video-player-for-react
a react video player component base
Disclaimer
- This library is currently in alpha version, DO NOT use in production!
Functions
Play/Pause | |
Navigation with progress bar | |
Enter Picture-In-Picture mode | |
Click on video to Play/Pause | |
Overlay play button | |
Mute | |
Adjust volume | |
Fullscreen mode | |
Select subtitles | |
Show subtitles | |
Playback rate |
Install
npm install --save video-player-for-react
CodeSandbox demo
https://codesandbox.io/s/video-player-for-react
Getting started
import React from 'react'
import { ReactVideoPlayer } from 'video-player-for-react'
import 'video-player-for-react/dist/index.css'
const App = () => {
return (
<ReactVideoPlayer
width='928px'
url='http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
type='video/mp4'
poster='http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg'
// captions={[
// {
// kind: 'captions',
// label: 'English',
// srcLang: 'en',
// src: 'caption_url'
// }
// ]}
/>
)
}
export default App
License
MIT © victoralvesf