Skip to content

Commit 71e78a2

Browse files
Merge pull request #249754 from chriswhilar/patch-81
Update manage-video-web.md
2 parents bf5c8d3 + ec32c39 commit 71e78a2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

articles/communication-services/how-tos/calling-sdk/includes/manage-video/manage-video-web.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,3 +455,36 @@ You can update `scalingMode` by invoking the `updateScalingMode` method:
455455
```js
456456
view.updateScalingMode('Crop');
457457
```
458+
459+
## Send video streams from two different cameras, in the same call from the same desktop device.
460+
[!INCLUDE [Public Preview Disclaimer](../../../../includes/public-preview-include.md)]
461+
This is supported as part of version 1.17.1-beta.1+ on desktop.
462+
- You can send video streams from two different cameras from a single desktop browser tab/app, in the same call, with the following code snippet:
463+
```js
464+
// Create your first CallAgent with identity A
465+
const callClient1 = new CallClient();
466+
const callAgent1 = await callClient1.createCallAgent(tokenCredentialA);
467+
const deviceManager1 = await callClient1.getDeviceManager();
468+
469+
// Create your second CallAgent with identity B
470+
const callClient2 = new CallClient();
471+
const callAgent2 = await callClient2.createCallAgent(tokenCredentialB);
472+
const deviceManager2 = await callClient2.getDeviceManager();
473+
474+
// Join the call with your first CallAgent
475+
const camera1 = await deviceManager1.getCameras()[0];
476+
const callObj1 = callAgent1.join({ groupId:123’}, { videoOptions: { localVideoStreams: [new LocalVideoStream(camera1)] } });
477+
478+
// Join the same call with your second CallAgent and make it use a different camera
479+
const camera2 = (await deviceManager2.getCameras()).filter((camera) => { return camera !== camera1 })[0];
480+
const callObj2 = callAgent2.join({ groupId: '123' }, { videoOptions: { localVideoStreams: [new LocalVideoStream(camera2)] } });
481+
482+
//Mute the microphone and speakers of your second CallAgent’s Call, so that there is no echos/noises.
483+
await callObj2.muteIncomingAudio();
484+
await callObj2.mute();
485+
```
486+
Limitations:
487+
- This must be done with two different call agents with different identities, hence the code snippet shows two call agents being used.
488+
- Sending the same camera in both CallAgent, is not supported. They must be two different cameras.
489+
- Sending two different cameras with one CallAgent is currently not supported.
490+
- On MacOS Safari, background blur video effects (from @azure/communication-effects), can only be applied to one camera, and not both at the same time.

0 commit comments

Comments
 (0)