Skip to content

Commit ea6098e

Browse files
authored
Add support for videoRecordingStartMode (#193)
Add support for videoRecordingStartMode
1 parent e96dfa9 commit ea6098e

4 files changed

Lines changed: 588 additions & 97 deletions

File tree

‎README.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,17 @@ vapi.on('error', (e) => {
148148

149149
## Recording
150150

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.
151+
When video recording is enabled on the call's artifact plan, Vapi starts the recording automatically when the user joins the call.
152+
153+
By default, the recording is started by the client. To have Vapi start the recording from the server, pass `videoRecordingStartMode: 'server'`. This may be more reliable on weak connections.
154+
155+
```javascript
156+
vapi.start(assistantId, undefined, undefined, undefined, undefined, {
157+
videoRecordingStartMode: 'server',
158+
});
159+
```
160+
161+
Recording start is asynchronous: success is signaled by the `recording-started` event and failure by the `recording-error` event.
152162

153163
A failed recording start is not retried automatically. Use `startRecording()` and `stopRecording()` to control the recording yourself. For example, to retry after a failure:
154164

0 commit comments

Comments
 (0)