voxeet / voxeet-sdk-web

The Dolby.io Communications SDK for Web.
https://www.npmjs.com/package/@voxeet/voxeet-web-sdk
Other
4 stars 2 forks source link

Updated stream is not found in participant.streams when streamUpdated called #4

Closed yerim1210 closed 2 years ago

yerim1210 commented 2 years ago

Context

I'm currently working on migrating web SDK from 2.4.0 to 3.3.0.

SDK settings: VoxeetSDK version: 3.3.0 VoxeetSDK flavor: production Telemetry status: enabled

Issue

When streamUpdated event is called, I've tried to find the same stream as the returning stream from participant.streams but could not find. I've tested this on streamAdded event and it had the stream. I simply used below code to print logs.

Expected Result

I would expect the stream to be found in participant.steams as well on streamUpdated.

FabienLavocat commented 2 years ago

Apologies for the delay in the answer, your syntax for the find is not correct, try this:

console.log(participant.streams.find((s) => s.id === stream.id));