• Stars
    star
    188
  • Rank 205,563 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

react-video-recorder

Installation

yarn add react-video-recorder

# Note: this project has react, react-dom, prop-types & styled-components as peerDependencies,
#       so if you're starting from scratch run this instead:
yarn add react-video-recorder react react-dom prop-types styled-components

Typescript

If using Typescript, typing is available via:

yarn add -D @types/react-video-recorder

Usage

Basic usage (edit in stakblitz):

import React from 'react'
import { render } from 'react-dom'
import VideoRecorder from 'react-video-recorder'

const App = () => (
  <VideoRecorder
    onRecordingComplete={(videoBlob) => {
      // Do something with the video...
      console.log('videoBlob', videoBlob)
    }}
  />
)

render(<App />, document.getElementById('root'))

Also check the Storybook for more demos and usage examples.

Note: if you click the "Show info" button in the top-right corner, you should be able to see a table with the supported prop-types.

Modifying the UI

All the UI can be customized by passing the following props:

renderDisconnectedView

View that's rendered before the user enables the camera access.

Default value: () => <DisconnectedView />

See <DisconnectedView /> source here.

renderLoadingView

View that's rendered while the camera is initializing.

() => <LoadingView />

See <LoadingView /> source here.

renderVideoInputView

View that's rendered when the browser does not support inline recording but allows opening the native camera (mainly iOS).

Default value: ({ videoInput }) => <Fragment>{videoInput}</Fragment/>

renderUnsupportedView

View that's rendered when the browser does not support recording video.

Default value: () => <UnsupportedView />

See <UnsupportedView /> source here.

renderErrorView

View that's rendered an unexpected error occurs.

Default value: () => <ErrorView />

See <ErrorView /> source here.

renderActions

Overlay that's rendered on top of the views and that contains the elements like the buttons, the timer or the countdown.

See the default implementation here.

Development

Requirements

node version ">=8.3"

Install packages

yarn install

Run the storybook demo

yarn start

Committing

To commit run yarn start then commit. We use Husky to verify before committing.

More Repositories

1

phaser-multiplayer-game

🎮 Simple real-time multiplayer phaser game example which uses node and websockets.
JavaScript
300
star
2

ipfs-chrome-station

💫 Chrome extension that let's you access IPFS urls seamlessly from your local IPFS node, and take a look at its stats
JavaScript
55
star
3

react-mobiscroll

👆 A simple wrapper of Mobiscroll for ReactJS.
JavaScript
14
star
4

yolo.tips

✈️ Webapp that suggests you weekend trips for you to go YOLO!
JavaScript
10
star
5

local-storage-blob-store

blob store that stores blobs on the browser's localStorage
JavaScript
8
star
6

yolo-tips

🚀 CLI and module that suggests you weekend trips
JavaScript
7
star
7

buffer-loader

Webpack loader that returns file contents as a Buffer
JavaScript
7
star
8

minigun-plugin-blessed

This Minigun plugin tries to give you a fancy output of the stats produced by Minigun in real-time
JavaScript
6
star
9

typeform-webhooks-boilerplate

Simple boilerplate node project for Typeform Webhooks
JavaScript
5
star
10

ampersand-array-checkbox-view

☑️ A view module for rendering and validating multiple checkbox inputs.
JavaScript
4
star
11

fenixedu

🎓 FenixEdu API Node.js Module Wrapper
JavaScript
3
star
12

muzzley-widget-tools

📱 A NW.js app that watches your local widget files and uploads them automatically to muzzley site
JavaScript
2
star
13

spectacular.video

😎 Web player for Spectacles' videos
HTML
2
star
14

ampersand-boilerplate-app

🌟 Simple boilerplate for AmpersandJS webapps
JavaScript
2
star
15

franciscodias.net

🌍 My own website
CSS
2
star
16

so

📚 Assignments for the Operating Systems course
C
2
star
17

extremeclimb

🎮 The best beer barrel avoiding game in the world!
Processing
1
star
18

http-blob-store

blob store that get blobs through http (only read)
JavaScript
1
star
19

bartolomeu-arduino

Arduino code for the Bartolomeu Bartender Bot
Arduino
1
star
20

free-tanso

🎮 A freaky music game!
JavaScript
1
star
21

asa

📚 Project assignments for the Analysis and Synthesis of Algorithms course
C++
1
star
22

moonshot

🚀 A realtime multiplayer HTML5 game using node and websockets
JavaScript
1
star
23

bumboo

Makes your http requests go through random proxies. Arr!
JavaScript
1
star
24

meo-wallet

💸 Node wrapper for MEO Wallet API
JavaScript
1
star