1. Your route
OnePOST route, protected by your app’s own authentication. It takes two kinds of body:
If the session replies with an
error (or doesn’t reply within about 15 seconds), answer with an HTTP error, such as 503. One route serves any number of browsers. With several conversations at once, give each its own route, such as /avatar/{conversation_id}.
This is exactly the contract of the SDK’s handleView, so the browser side can be the SDK’s player or your own code. See the Python example for a complete route.
2. The page
- With LiveAvatarView (recommended)
- Plain WebRTC
The SDK’s browser player works with any backend that implements the route above. It fits the video to its container, plays the voice, and reconnects by itself after network drops or a With a bundler,
republished stream.npm install @interviewflowai/talking-avatar and import from @interviewflowai/talking-avatar/live. See the LiveAvatarView reference.Networks
The avatar’s stream works for most networks with a public STUN server. For users behind strict corporate firewalls, add your own TURN server toiceServers (in LiveAvatarView, its iceServers option).