d

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567
ouroffice@aware.com

 

KMF

Record Screen Using MediaStream APIs – use-screen-recorder

use-screen-recorder is a React hook for easily recording screen using MediaStream APIs.

How to use it:

1. Install and import the use-screen-recorder.

# Yarn
$ yarn add use-screen-recorder

# NPM
$ npm i use-screen-recorder --save
import * as React from "react";
import useScreenRecorder from "use-screen-recorder";

2. Basic usage.

const Example = () => {
  const {
    blobUrl,
    pauseRecording,
    resetRecording,
    resumeRecording,
    startRecording,
    status,
    stopRecording,
  } = useScreenRecorder();
  return (
    <div>
      <video src={blobUrl} />
      <small>Status: {status}</small>
      <button onClick={startRecording}>Start Recording</button>
      <button onClick={stopRecording}>Stop Recording</button>
      <button onClick={pauseRecording}>Pause Recording</button>
      <button onClick={resumeRecording}>Resume Recording</button>
      <button onClick={resetRecording}>Reset Recording</button>
    </div>
  );
};

Preview:

Download Details:

Author: ishan-chhabra

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/ishan-chhabra/use-screen-recorder

License: MIT

Credit: Source link

Previous Next
Close
Test Caption
Test Description goes like this