@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 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; a start from the page also opens it, so a host button can be the only thing the visitor touches:
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. Most failures arrive as tavus:error;
79
- // the daily limit, a busy PAL and a bot check that cannot run arrive as tavus:mode-change with mode "unavailable"
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({