A media recording library that allows recording using video and audio
npm install @kylar101/recorder.js
import Recorder from '@kylar101/recorder.js'
To create the recorder instance:
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.
<div id='recorderContainer'>
<!-- Whatever you want - the recorder controls will be inserted after -->
</div>
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()
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()