You can install Retell Player through NPM
npm install --save @retell/player-js
yarn add @retell/player-js
Or, you can use CDN
<script src="<https://unpkg.com/@retell/player-js@latest/dist/common.min.js>"></script>
To initialize Retell Player, use the following:
<script data-voiced="player">
Retell.init({ url: "..." })
</script>
if you install player through NPM you should import the package
import { Retell } from '@retell/player-js'
You can run custom functions by registering Player callbacks:
Retell.registerCallback(eventName, callback, options)