@tavus/widget 0.19.1 → 0.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.iife.js +4 -4
- package/dist/index.mjs +97 -86
- package/dist/integration.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,13 +70,13 @@ el.addEventListener("tavus:protocol-message", (e) => {}); // every protocol even
|
|
|
70
70
|
|
|
71
71
|
Also `tavus:conversation-created`, `tavus:state-change` and `tavus:mode-change`. `tavus:chat-message` and `tavus:message` are in the type definitions for compatibility and never fire.
|
|
72
72
|
|
|
73
|
-
Methods exist once `tavus:ready` has fired. The widget adds `open()` and `close()` for the popup
|
|
73
|
+
Methods exist once `tavus:ready` has fired. The widget adds `open()` and `close()` for the popup. `close()` is the popup's own close path: it ends a call in progress and cancels a pending start before it collapses. A start from the page also opens the popup, so a host button can be the only thing the visitor touches:
|
|
74
74
|
|
|
75
75
|
```js
|
|
76
76
|
el.open();
|
|
77
77
|
el.close();
|
|
78
|
-
el.startConversation(); // same path as the visitor pressing Start; never rejects.
|
|
79
|
-
// the daily limit, a busy PAL and a bot check that cannot run
|
|
78
|
+
el.startConversation(); // same path as the visitor pressing Start; never rejects. Failures arrive as tavus:error;
|
|
79
|
+
// the daily limit, a busy PAL and a bot check that cannot run also move the element to its unavailable screen (tavus:mode-change with mode "unavailable")
|
|
80
80
|
await el.createConversation(); // create the room now so the next start joins without the wait
|
|
81
81
|
el.endConversation();
|
|
82
82
|
el.sendMessage({
|