Commit eea67458 authored by Yoann HOUPERT's avatar Yoann HOUPERT
Browse files

add check participant value

parent be245bf5
Pipeline #3717 passed with stage
in 48 seconds
......@@ -24,16 +24,18 @@ robotController = {
getRemoteParticipants: () => {
const participants = easyrtc.getRoomOccupantsAsArray(room);
const res = [];
for (let i = 0; i < participants.length; i++) {
const participant = participants[i];
try {
const mediaStream = robotController.getRemoteStream(participant);
if (mediaStream !== null) {
res.push(participant);
if (participants) {
for (let i = 0; i < participants.length; i++) {
const participant = participants[i];
try {
const mediaStream = robotController.getRemoteStream(participant);
if (mediaStream !== null) {
res.push(participant);
}
} catch (err) {
console.error('could not get remote stream for %s', participant);
console.error(err);
}
} catch (err) {
console.error('could not get remote stream for %s', participant);
console.error(err);
}
}
return res;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment