LiveAvatarView talks to one route on your server that returns avatar.handleView(body). Use it in direct mode only; in LiveKit mode, your LiveKit client plays the avatar.
new LiveAvatarView(options)
HTMLElement
required
The element the video fills, fitted whole and never cropped. Or pass your own
<video> element.string | (body) => Promise<object>
required
Your route that returns
avatar.handleView(body) as JSON. A string is POSTed with same-origin cookies. Pass a function to make the request yourself, for example with auth headers:RTCIceServer[]
default:"a public STUN server"
Add your TURN server for viewers behind strict firewalls.
(error: Error) => void
default:"console.warn"
Errors while connecting. The view retries by itself.