@vapi-ai/web 2.6.3 → 2.7.0
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 +14 -0
- package/api.ts +25665 -11101
- package/dist/api.d.ts +22973 -13375
- package/dist/api.js +2171 -697
- package/dist/vapi.d.ts +25 -0
- package/dist/vapi.js +116 -48
- package/package.json +1 -1
- package/vapi.ts +136 -56
package/README.md
CHANGED
|
@@ -146,6 +146,20 @@ vapi.on('error', (e) => {
|
|
|
146
146
|
});
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
+
## Recording
|
|
150
|
+
|
|
151
|
+
When video recording is enabled on the call's artifact plan, Vapi starts a recording automatically when the call begins. When the server provides a meeting token for the call (`call.transport.callToken`), the SDK joins with it and Daily auto-starts the cloud recording, which is more reliable on weak networks. Otherwise the SDK starts the recording from the client after joining. Recording start is asynchronous: success is signaled by the `recording-started` event and failure by the `recording-error` event.
|
|
152
|
+
|
|
153
|
+
A failed recording start is not retried automatically. Use `startRecording()` and `stopRecording()` to control the recording yourself. For example, to retry after a failure:
|
|
154
|
+
|
|
155
|
+
```javascript
|
|
156
|
+
vapi.on('recording-error', (e) => {
|
|
157
|
+
console.error('Recording failed', e);
|
|
158
|
+
// Retry after a short delay
|
|
159
|
+
setTimeout(() => vapi.startRecording(), 5000);
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
149
163
|
## Events
|
|
150
164
|
|
|
151
165
|
You can listen to the following events:
|