Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.
/ Recorder.js Public archive

A media recording library that allows recording using video and audio

License

Notifications You must be signed in to change notification settings

Kylar101/Recorder.js

Repository files navigation

Recorder.js

A media recording library that allows recording using video and audio

Usage

Install and Setup

npm install @kylar101/recorder.js
import Recorder from '@kylar101/recorder.js'

To create the recorder instance:

JavaScript

var rec = new Recorder({ containerID: 'recorderContainer' })

The recorder constructor takes one arguments, the id for the HTML container.

The constructor will add a start and stop button into the container that is specified.

HTML

<div id='recorderContainer'>
    <!-- Whatever you want - the recorder controls will be inserted after -->
</div>

Configuration

Media Type

The recorder default media type is audio. To set the instance to a particular type, use the following function

rec.setMediaType('video')
// or
rec.setMediaType('audio')

To toggle the media type, use the following function

rec.toggleMediaType()

Inialization

To inialize the recorder for use, use the following function

rec.initialiseMedia()

NOTE: If you change the media type after initialization, you will need to reinialize the recorder

rec.initialiseMedia()
rec.toggleMediaType()
rec.initialiseMedia()

About

A media recording library that allows recording using video and audio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published