Skip to main content

Get started

This guide will show you how to install and mount the recorder.

Installation

There are multiple ways to install the recorder depending on your project.

npm install @pathfindr.dev/recorder

Create container

Add an empty <div> element with a specified height and width, and an id. This is where the recorder will be mounted.

<div id="recorder-container" style="height: 200px; width: 250px"></div>

Initialization

Initialize the recorder by giving it the options object.

import Recorder from '@pathfindr.dev/recorder';
import '@pathfindr.dev/recorder/dist/recorder.css';

const element = document.getElementById('recorder-container');
const options = {
recorderType: 'camera',
accessToken: 'documenta-tion-toke-n935-27ee26170781',
language: 'en',
};

const recorder = new Recorder(element, options);