@analytickit/react-rrweb-player
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@analytickit/react-rrweb-player

React-based player for rrweb

NPM JavaScript Style Guide

Install

npm install --save @analytickit/react-rrweb-player

Usage

import React, { Component } from 'react'

import { EventIndex, formatTime, PlayerRef, PlayerContextProvider, PlayerController, PlayerFrame } from '@analytickit/react-rrweb-player'
import '@analytickit/react-rrweb-player/dist/index.css'

class Example extends Component {
    render() {
        return (
            <PlayerContextProvider
                ref={ref}
                events={events}
                key={recording.key}
                onPlayerTimeChange={() => {}}
                onNext={() => {}}
                onPrevious={() => {}}
                duration={duration}
                isBuffering={false}
            >
                <PlayerFrame />
                <PlayerController />
            </PlayerContextProvider>
        )
    }
}

Developing locally

To develop locally, you can run the following commands and an example app will be launched on port 3000.

yarn # only the first time to install dependencies
yarn start # to run the base component
cd example
yarn start # to run the example project

Questions?

Join our Slack community.

Readme

Keywords

none

Package Sidebar

Install

npm i @analytickit/react-rrweb-player

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

165 kB

Total Files

16

Last publish

Collaborators

  • kitadmin1