Skip to content

Commit beeb3bb

Browse files
Nash0x7E2d3xvn
andauthored
Add docs for Call Recording (#637)
* Add docs for call recoriding * Update docusaurus/docs/Flutter/05-advanced/05-call-recording.mdx --------- Co-authored-by: Deven Joshi <[email protected]>
1 parent 222d169 commit beeb3bb

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
slug: /recording
3+
title: Recording
4+
---
5+
A key feature of modern communication tools is the ability to quickly and easily record calls. This functionality is used for everything from quality assurance and training to legal compliance or simply as a matter of convenience for keeping track of conversations and later reviewing them.
6+
7+
In this guide, we will look at how developers using Stream Video can easily record their calls using our Flutter SDK. We will cover the technical details involved in starting, stopping, and observing the state of the call recording.
8+
9+
### Recording
10+
The `Call` object provides access to the recording API, enabling you to start and stop call recordings. To initiate recording, you can use the `call.startRecording` method on the active call object. Additionally, you can check the current recording status by accessing the `callState.isRecording` property. Monitoring this property allows you to update your application's UI to indicate whether the current call is being recorded.
11+
12+
```dart
13+
StreamCallContent(
14+
call: call,
15+
callState: callState,
16+
callControlsBuilder: (context, call, callState) {
17+
final recording = callState.isRecording; // `isRecording` tells us whether the call is currently being recorded
18+
return StreamCallControls(options: [
19+
// We can add a custom call option which can be used to start and stop recording
20+
CallControlOption(
21+
icon: recording
22+
? const Icon(Icons.emergency_recording,
23+
color: Colors.red)
24+
: const Icon(Icons.emergency_recording,
25+
color: Colors.grey),
26+
onPressed: () {
27+
if (!recording) {
28+
// If we are not recording, we can start recording the current call
29+
call.startRecording();
30+
} else {
31+
// If we are recording, we can stop recording the current call
32+
call.stopRecording();
33+
}
34+
},
35+
),
36+
]);
37+
},
38+
);
39+
```
40+
41+
### Permissions
42+
43+
Before the user is allowed to start recording, the user must have the corresponding permissions. As a form of best practice, we encourage integrators to check the permissions before allowing users to execute a given action. Permissions for each app and user role can be found on the Stream dashboard. Please visit https://dashboard.getstream.io/ to view and change the permission scope for your app.
44+
45+
### Retrieving the call recordings
46+
47+
The call recording data can be retrieved by calling the `listRecordings()`. By default, this method will use the current call id (`CID`) to look up the recordings for the current call session. The method returns `List<CallRecording>` which allows you to loop over the different recording objects.
48+
49+
:::tip
50+
Multiple recordings can be made during a single call session, and a single call CID can also be reused for multiple sessions.
51+
:::

0 commit comments

Comments
 (0)