https://github.com/posthog/posthog-react-rrweb-player
https://github.com/posthog/posthog-react-rrweb-player
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/posthog/posthog-react-rrweb-player
- Owner: PostHog
- License: mit
- Created: 2020-11-18T13:10:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T11:09:52.000Z (almost 2 years ago)
- Last Synced: 2025-04-08T12:50:51.931Z (9 months ago)
- Language: TypeScript
- Size: 3.44 MB
- Stars: 12
- Watchers: 4
- Forks: 23
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @posthog/react-rrweb-player
> React-based player for rrweb
[](https://www.npmjs.com/package/@posthog/react-rrweb-player) [](https://standardjs.com)
## Install
```bash
npm install --save @posthog/react-rrweb-player
```
## Usage
```tsx
import React, { Component } from 'react'
import { EventIndex, formatTime, PlayerRef, PlayerContextProvider, PlayerController, PlayerFrame } from '@posthog/react-rrweb-player'
import '@posthog/react-rrweb-player/dist/index.css'
class Example extends Component {
render() {
return (
{}}
onNext={() => {}}
onPrevious={() => {}}
duration={duration}
isBuffering={false}
>
)
}
}
```
## Developing locally
To develop locally, you can run the following commands and an example app will be launched on port 3000.
```bash
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 community.](http://posthog.com/questions)