Skip to content

Commit fe9be98

Browse files
authored
Merge pull request #203636 from RinaRish/master
Edited Call Recording quick start to include unmixed audio-only code snippets
2 parents 489bc38 + df6dd60 commit fe9be98

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

articles/communication-services/quickstarts/voice-video-calling/call-recording-sample.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ ms.custom: mode-api
1919

2020
This quickstart gets you started recording voice and video calls. This quickstart assumes you've already used the [Calling client SDK](get-started-with-video-calling.md) to build the end-user calling experience. Using the **Calling Server APIs and SDKs** you can enable and manage recordings.
2121

22+
> [!NOTE]
23+
> **Unmixed audio-only** is still in a **Private Preview** and NOT enabled for Teams Interop meetings.
24+
2225
::: zone pivot="programming-language-csharp"
2326
[!INCLUDE [Build Call Recording server sample with C#](./includes/call-recording-samples/recording-server-csharp.md)]
2427
::: zone-end

articles/communication-services/quickstarts/voice-video-calling/includes/call-recording-samples/recording-server-csharp.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@ var startRecordingResponse = await callingServerClient.InitializeServerCall("<se
9696
```
9797
The `StartRecordingAsync` API response contains the recording ID of the recording session.
9898

99+
### Specify a user on a channel 0 for unmixed audio-only
100+
101+
```csharp
102+
var channelAffinity = new []
103+
{
104+
new ChannelAffinity
105+
{
106+
Channel = 0,
107+
Participant = user,
108+
},
109+
};
110+
111+
var startRecordingResponse = await callingServerClient.InitializeServerCall("<servercallid>").StartRecordingAsync("<callbackuri>","<RecordingContent>","<RecordingChannel>","<RecordingFormat>", channelAffinity).ConfigureAwait(false);
112+
```
113+
99114
## Start recording session with options using 'StartRecordingAsync' server API
100115

101116
Use the server call ID received during initiation of a call.
@@ -109,6 +124,21 @@ var startRecordingResponse = await callingServerClient.InitializeServerCall("<se
109124
```
110125
The `StartRecordingAsync` API response contains the recording ID of the recording session.
111126

127+
### Specify a user on a channel 0 for unmixed audio-only
128+
129+
```csharp
130+
var channelAffinity = new []
131+
{
132+
new ChannelAffinity
133+
{
134+
Channel = 0,
135+
Participant = user,
136+
},
137+
};
138+
139+
var startRecordingResponse = await callingServerClient.InitializeServerCall("<servercallid>").StartRecordingAsync("<callbackuri>", RecordingContent.Audio, RecordingChannel.Unmixed, RecordingFormat.Wav, channelAffinity).ConfigureAwait(false);
140+
```
141+
112142
## Stop recording session using 'StopRecordingAsync' server API
113143

114144
Use the recording ID received in response of `StartRecordingAsync`.

articles/communication-services/quickstarts/voice-video-calling/includes/call-recording-samples/recording-server-java.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,20 @@ Response<StartCallRecordingResult> response = this.callingServerClient.initializ
145145
.startRecordingWithResponse(String.valueOf(recordingStateCallbackUri), recordingOptions, null);
146146
```
147147
148+
### Specify a user on a channel 0 for unmixed audio-only
149+
```java
150+
URI recordingStateCallbackUri = new URI("<CallbackUri>");
151+
StartRecordingOptions recordingOptions = new StartRecordingOptions();
152+
recordingOptions.setRecordingContent(RecordingContent.AUDIO);
153+
recordingOptions.setRecordingChannel(RecordingChannel.UNMIXED);
154+
recordingOptions.setRecordingFormat(RecordingFormat.WAV);
155+
recordingOptions.setChannelAffinity({ new ChannelAffinity(0, user) });
156+
Response<StartCallRecordingResult> response = this.callingServerClient.initializeServerCall("<serverCallId>")
157+
.startRecordingWithResponse(String.valueOf(recordingStateCallbackUri), recordingOptions, null);
158+
```
159+
160+
The `StartRecordingAsync` API response contains the recording ID of the recording session.
161+
148162
## Stop recording session using 'stopRecordingWithResponse' server API
149163
150164
Use the recording ID received in response of `startRecordingWithResponse`.

0 commit comments

Comments
 (0)