Skip to content

Commit c0589fb

Browse files
author
Kevin Le Goff
committed
Convert typescript code to javascript
1 parent 84eb89f commit c0589fb

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ This can be done by going through the array or video stream (`videoStreams`) of
325325
is accessed via the `Call` object.
326326

327327
```js
328-
const remoteVideoStream: RemoteVideoStream = call.remoteParticipants[0].videoStreams[0];
329-
const streamType: MediaStreamType = remoteVideoStream.mediaStreamType;
328+
const remoteVideoStream = call.remoteParticipants[0].videoStreams[0];
329+
const streamType = remoteVideoStream.mediaStreamType;
330330
```
331331

332332
To render `RemoteVideoStream`, you have to subscribe to its `isAvailableChanged` event. If the `isAvailable` property changes to `true`,
@@ -447,16 +447,9 @@ application should render at a given moment. Applications should handle these ch
447447
accordingly to the recommendation. There's a debounce period (around 10 s) between each update.
448448

449449
**Usage**
450-
The `optimalVideoCount` feature is a call feature.
451-
452-
<!-- TODO KLG convert this to Javascript -->
453-
```typescript
454-
interface OptimalVideoCountCallFeature extends CallFeature {
455-
off(event: 'optimalVideoCountChanged', listener: PropertyChangedEvent): void;
456-
on(event: 'optimalVideoCountChanged', listener: PropertyChangedEvent): void;
457-
readonly optimalVideoCount: number;
458-
}
450+
The `optimalVideoCount` feature is a call feature. You need to reference the feature `OptimalVideoCount` via the `feature` method of the `Call` object. You can then set a listener via the `on` method of the `OptimalVideoCountCallFeature` to be notifiied when the optimalVideoCount changes. To unsubscribe from the changes you can call the `off` method
459451

452+
```javascript
460453
const optimalVideoCountFeature = call.feature(Features.OptimalVideoCount);
461454
optimalVideoCountFeature.on('optimalVideoCountChanged', () => {
462455
const localOptimalVideoCountVariable = optimalVideoCountFeature.optimalVideoCount;

0 commit comments

Comments
 (0)