Skip to content

tylerbuchea/use-screen-recording

Repository files navigation

use-screen-recording

Easily create screen recordings using a React Hook.

NPM JavaScript Style Guide

Install

npm install --save use-screen-recording

Usage

import React from "react";
import useScreenRecording from "use-screen-recording";

export default function App() {
  const { isRecording, recording, toggleRecording } = useScreenRecording();

  return (
    <div>
      <button onClick={toggleRecording}>
        {isRecording ? "Stop" : "Start Recording"}
      </button>

      {!!recording && (
        <video autoPlay src={recording && URL.createObjectURL(recording)} />
      )}
    </div>
  );
}

Contribute

If you'd like to contribute you can start hacking on the library right away using the CodeSandbox Project.

License

MIT © tylerbuchea


This hook is created using create-react-hook.

About

Easily create screen recordings using React Hooks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published