0.0.1-rc.10 • Published 9 months ago
@twipla/recordings-player v0.0.1-rc.10
TWIPLA Recordings Player
React library that allows playing TWIPLA recordings.
Installation and usage
Installation
npm install @twipla/recordings-libraryUsage
In order to get started with the lightest integration, the following props are mandatory:
websiteId- the id of the website where the recordings were createdsessionId- the id of the session for which the recording events need to be playedtoken- bearer token used for interacting with the TWIPLA API (note: pass only the token, withoutBearer)
import { TwiplaPlayer } from '@twipla/recordings-player';
import '@twipla/recordings-player/dist/esm/index.css';
const ReactComponent = () => {
return <TwiplaPlayer
websiteId={WEBSITE_ID}
sessionId={SESSION_ID}
token={AUTHENTICATION_TOKEN}
/>
};Customization options
In addition to the mandatory props listed above, there are others available:
loaderNode- will be displayed as long as the API calls are in progresserrorNode- will be displayed if an error occursplayButton- allows the customization of a play/pause button with proprietary components/iconsskipInactiveSwitch- allows the customization of the skip inactive switch with a proprietary componenttoggleFullScreenButton- allows the customization of the fullscreen toggle button with a proprietary component
<TwiplaPlayer
loaderNode={<Loader />}
errorNode={({ message, status }) => <ErrorNode message={message} status={status} />}
playButton={({ isPlaying }) => <div>{isPlaying ? 'Playing' : 'Paused'}</div>}
skipInactiveSwitch={({ isSkipping }) => <div>{isSkipping ? 'Skipping' : 'Not skipping'}</div>}
toggleFullScreenButton={({ isFullscreen }) => <div>{isFullscreen ? 'Minimize' : 'Maximize'}</div>}
/>© TWIPLA, 2024
0.0.1-rc.10
9 months ago
0.0.1-rc.7
10 months ago
0.0.1-rc.8
10 months ago
0.0.1-rc.9
10 months ago
0.0.1-rc.6
10 months ago
0.0.1-rc.5
10 months ago
0.0.1-rc.3
1 year ago
0.0.1-rc.4
1 year ago
0.0.1-rc.2
1 year ago
0.0.1-rc.1
1 year ago