Closed yerim1210 closed 2 years ago
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
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.
streamUpdated
participant.streams
streamAdded
VoxeetSDK.conference.on('streamUpdated', (participant, stream) => { console.log(find(participant.streams, (s) => s.id === stream.id)); // return FALSE });
VoxeetSDK.conference.on('streamAdded', (participant, stream) => { console.log(find(participant.streams, (s) => s.id === stream.id)); // return TRUE });
I would expect the stream to be found in participant.steams as well on streamUpdated.
participant.steams
Apologies for the delay in the answer, your syntax for the find is not correct, try this:
find
console.log(participant.streams.find((s) => s.id === stream.id));
Context
I'm currently working on migrating web SDK from 2.4.0 to 3.3.0.
Issue
When
streamUpdated
event is called, I've tried to find the same stream as the returning stream fromparticipant.streams
but could not find. I've tested this onstreamAdded
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 onstreamUpdated
.