hanc-webrtc-widgets 1.3.2 → 1.4.1
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 +30 -0
- package/dist/hanc-webrtc-widgets.es.js +205 -193
- package/dist/hanc-webrtc-widgets.umd.js +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,12 +50,20 @@ export const HancAiInlineCall = createComponent({
|
|
|
50
50
|
tagName: 'hanc-ai-inline-call',
|
|
51
51
|
elementClass: InlineCall,
|
|
52
52
|
react: React,
|
|
53
|
+
events: {
|
|
54
|
+
onCallStart: 'call-start',
|
|
55
|
+
onCallEnd: 'call-end',
|
|
56
|
+
},
|
|
53
57
|
});
|
|
54
58
|
|
|
55
59
|
export const HancAiFloatingCall = createComponent({
|
|
56
60
|
tagName: 'hanc-ai-floating-call',
|
|
57
61
|
elementClass: FloatingCall,
|
|
58
62
|
react: React,
|
|
63
|
+
events: {
|
|
64
|
+
onCallStart: 'call-start',
|
|
65
|
+
onCallEnd: 'call-end',
|
|
66
|
+
},
|
|
59
67
|
});
|
|
60
68
|
|
|
61
69
|
// An example of a component where both widgets are used
|
|
@@ -94,6 +102,10 @@ export const HancAiInlineCall = dynamic(
|
|
|
94
102
|
tagName: 'hanc-ai-inline-call',
|
|
95
103
|
elementClass: InlineCall,
|
|
96
104
|
react: React,
|
|
105
|
+
events: {
|
|
106
|
+
onCallStart: 'call-start',
|
|
107
|
+
onCallEnd: 'call-end',
|
|
108
|
+
},
|
|
97
109
|
});
|
|
98
110
|
},
|
|
99
111
|
{ ssr: false },
|
|
@@ -107,6 +119,10 @@ export const HancAiFloatingCall = dynamic(
|
|
|
107
119
|
tagName: 'hanc-ai-floating-call',
|
|
108
120
|
elementClass: FloatingCall,
|
|
109
121
|
react: React,
|
|
122
|
+
events: {
|
|
123
|
+
onCallStart: 'call-start',
|
|
124
|
+
onCallEnd: 'call-end',
|
|
125
|
+
},
|
|
110
126
|
});
|
|
111
127
|
},
|
|
112
128
|
{ ssr: false },
|
|
@@ -138,6 +154,13 @@ An “inline” widget that you embed directly in page content (often as a hero
|
|
|
138
154
|
| `button-start-text` | string | Custom start button text (default: `Start Call with ai`) |
|
|
139
155
|
| `button-connecting-text` | string | Custom connecting button text (default: `Connecting...`) |
|
|
140
156
|
|
|
157
|
+
#### Available Events:
|
|
158
|
+
|
|
159
|
+
| Event Name | Description |
|
|
160
|
+
| ------------ | ------------------------------------------------------------ |
|
|
161
|
+
| `call-start` | Fired when a call is successfully connected and starts. |
|
|
162
|
+
| `call-end` | Fired when a call ends, either by hangup or due to an error. |
|
|
163
|
+
|
|
141
164
|
#### Available CSS Parts for Styling:
|
|
142
165
|
|
|
143
166
|
| Part Name | Description |
|
|
@@ -193,6 +216,13 @@ A persistent, docked widget that floats in the corner and launches the same voic
|
|
|
193
216
|
| `button-connecting-text` | string | Custom connecting button text (default: `Connecting...`) |
|
|
194
217
|
| `button-end-text` | string | End button text (default: `End call`) |
|
|
195
218
|
|
|
219
|
+
#### Available Events:
|
|
220
|
+
|
|
221
|
+
| Event Name | Description |
|
|
222
|
+
| ------------ | ------------------------------------------------------------ |
|
|
223
|
+
| `call-start` | Fired when a call is successfully connected and starts. |
|
|
224
|
+
| `call-end` | Fired when a call ends, either by hangup or due to an error. |
|
|
225
|
+
|
|
196
226
|
#### Available CSS Parts for Styling:
|
|
197
227
|
|
|
198
228
|
| Part Name | Description |
|