# Error in videoSDK at participant side

**URL:** <https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050>\
**Category:** Web\
**Created:** [July 12, 2022, 5:28am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050 "2022-07-12T05:28:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![vamshidudducts](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vamshidudducts/32/39299_2.png) [@vamshidudducts](https://devforum.zoom.us/u/vamshidudducts)\
**Post date:** [July 12, 2022, 5:28am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/1 "2022-07-12T05:28:34Z")

</div>

**Description**  
can’t load host video at participant side

**Browser Console Error**  
Detected unrecognised user ignoring ID {userID}

**Which Web Video SDK version?**  
1.3.0

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 12, 2022, 4:11pm UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/3 "2022-07-12T16:11:14Z")

</div>

Hey @vamshidudducts ,

Please fill out the post template so we have enough info to help. 🙂

* * *

**Description**  
A clear and concise description of what the question is.

**Browser Console Error**  
The full error message or issue you are running into.

**Which Web Video SDK version?**  
Knowing the version can help us to identify your issue faster. [e.g. 1.0]

**Video SDK Code Snippets**  
The code snippets that are causing the error / issue so we can reproduce.

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Go to ‘…’
2. Click on ‘…’
3. Scroll down to ‘…’
4. See error

**Screenshots**  
If applicable, add screenshots to help explain your problem.

**Device (please complete the following information):**

- Device: [e.g. Macbook Pro]
- OS: [e.g. macOS 11]
- Browser: [e.g. Chrome]
- Browser Version [e.g. 88.0.4324.150 (Official Build) (x86\_64)]

**Additional context**  
Add any other context about the problem here.

* * *

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![vamshidudducts](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vamshidudducts/32/39299_2.png) [@vamshidudducts](https://devforum.zoom.us/u/vamshidudducts)\
**Post date:** [July 13, 2022, 4:39am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/4 "2022-07-13T04:39:06Z")

</div>

**Video SDK Code Snippets**

```auto
const onPeerVideoStateChangedListener = (zoomClient, mediaStream) => {
    zoomClient.on('peer-video-state-change', async (payload) => {
        console.log('onPeerVideoStateChange', payload);
        
        const { action, userId } = payload;

        if (userId !== state.participantId) {
            console.log('Detected unrecognized participant ID. Ignoring: ', userId);
            return;
        }

        if (action === PEER_VIDEO_STATE_CHANGE_ACTION_TYPE.Start) {
            toggleParticipantVideo(mediaStream, true);
        } else if (action === 'Stop') {
            toggleParticipantVideo(mediaStream, false);
        }
    });
};

```

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1.host joins session  
2.participant join session  
3. at host side both videos are rendered(host’s and participant’s)  
4.at participant side only participant video is rendered.

**Device (please complete the following information):**

- Device: Macbook Pro
- OS: macOS 12.4
- Browser: [Chrome]
- Browser Version 103.0.5060.53 (Official Build) (x86\_64)

**Additional context**  
This below error is consoled when host joins  
**Detected unrecognized participant ID. Ignoring**

@tommy

---

<div class="post-metadata">

**Author:** ![vamshidudducts](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vamshidudducts/32/39299_2.png) [@vamshidudducts](https://devforum.zoom.us/u/vamshidudducts)\
**Post date:** [July 14, 2022, 5:33am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/5 "2022-07-14T05:33:35Z")

</div>

Hi @vic.yang @tommy ,  
any inputs on this error ?

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 14, 2022, 5:51am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/6 "2022-07-14T05:51:07Z")

</div>

Hey @vamshidudducts

Does the code jump out of here `if (userId !== state.participantId) {` ?  
Could you provide the assignment of `state.participantId`?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![vamshidudducts](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vamshidudducts/32/39299_2.png) [@vamshidudducts](https://devforum.zoom.us/u/vamshidudducts)\
**Post date:** [July 14, 2022, 7:02am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/7 "2022-07-14T07:02:01Z")

</div>

code enters `if (userId !== state.participantId) ` condition and console’s

**Detected unrecognized participant ID. Ignoring**

assignment of state.participantId is happening here.

```auto
const handleParticipantChange = (payloadEntry, addRemoveType) => {
    const { userId } = payloadEntry;

    // For this demo, only a single participant is handled to keep things simple
    // and succinct. This can be extended into a participant array/set here 
    if (userId === undefined) {
        return;
    }
    
    switch (addRemoveType) {
        case PARTICIPANT_CHANGE_TYPE.ADD:
            
            if (userId !== state.selfId && !state.hasParticipant) {
                console.log("userId",userId)
                state.participantId = userId;
                state.hasParticipant = !state.hasParticipant;
            } else {
                console.log('Detected new participant. Ignoring: ', userId);
                console.log('State has participant: ', state.hasParticipant);
                console.log('Participant ID: ', state.participantId);
            }
            break;
        case PARTICIPANT_CHANGE_TYPE.REMOVE:
            if (userId !== state.selfId && state.hasParticipant) {
                state.resetParticipantId();
                state.hasParticipant = !state.hasParticipant;
            } else {
                console.log('Detected unknown participant leaving. Ignoring: ', userId);
                console.log('Participant ID: ', state.participantId);
            }
            break;
        default:
            console.log('Unexpected ADD_REMOVE_TYPE');
            break;
    }
    
}

```

This error is occurred while trying out the official web-sample for videoSDK  
Link to web-Sample: [Link](https://github.com/zoom/videosdk-web-sample/tree/master/purejs-demo)  
@vic.yang

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 14, 2022, 7:26am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/8 "2022-07-14T07:26:54Z")

</div>

Hey @vamshidudducts

I apologize that we haven’t updated the sample code in time.

The `participants` should be assigned to an array object. Here is the pseudocode:

```javascript
const participants =[];
switch(addRemoveType){
  case PARTICIPANT_CHANGE_TYPE.ADD:
    participants.push(payloadEntry.userId);
    // ...
    break;
  case PARTICIPANT_CHANGE_TYPE.REMOVE:
    const index = participants.findIndex(payloadEntry.userId);
    participants.splice(index,1);
    // ...
    break;
   // ...
}

```

```javascript
zoomClient.on('peer-video-state-change', async (payload) => {
  if(!state.participants.includes(payload.userId)){
    console.log('Detected unrecognized participant ID. Ignoring: ',payload.userId);
    return;
  }
  // ...
})

```

Hope this can help you.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![vamshidudducts](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vamshidudducts/32/39299_2.png) [@vamshidudducts](https://devforum.zoom.us/u/vamshidudducts)\
**Post date:** [July 14, 2022, 7:57am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/9 "2022-07-14T07:57:45Z")

</div>

> [@vic.yang](#):
>
> ```auto
> if(!state.participants.includes(payload.userId)){
> console.log('Detected unrecognized participant ID. Ignoring: ',payload.userId);
> return;
> }
> 
> ```

Hi @vic.yang ,  
can you please update sample code ?  
still facing same issue after applying above code .

---

<div class="post-metadata">

**Author:** ![vamshidudducts](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vamshidudducts/32/39299_2.png) [@vamshidudducts](https://devforum.zoom.us/u/vamshidudducts)\
**Post date:** [July 14, 2022, 8:02am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/10 "2022-07-14T08:02:22Z")

</div>

Hi @vic.yang ,  
another error noticed when updated to above code

```auto
{type: 'INVALID_PARAMETERS', reason: 'user is not send video'}
reason: "user is not send video"
type: "INVALID_PARAMETERS"

```

any inputs on this?

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 14, 2022, 8:10am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/11 "2022-07-14T08:10:24Z")

</div>

Hey @vamshidudducts

OK. I will contact our engineer to update the sample code.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 14, 2022, 8:16am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/12 "2022-07-14T08:16:11Z")

</div>

Hey @vamshidudducts

It would be better to check the video state of the user before rendering the video, calling `client.getAllUser()` to obtain the user’s list, the `bVideoOn` property indicates whether the user is starting video.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![vamshidudducts](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vamshidudducts/32/39299_2.png) [@vamshidudducts](https://devforum.zoom.us/u/vamshidudducts)\
**Post date:** [July 14, 2022, 8:19am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/13 "2022-07-14T08:19:48Z")

</div>

Hey @vic.yang ,  
Thank you .  
I’ll try to check this.

---

<div class="post-metadata">

**Author:** ![vamshidudducts](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vamshidudducts/32/39299_2.png) [@vamshidudducts](https://devforum.zoom.us/u/vamshidudducts)\
**Post date:** [July 17, 2022, 7:40am UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/14 "2022-07-17T07:40:14Z")

</div>

Hi @vic.yang ,  
any update regarding the sample code?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [August 16, 2022, 5:41pm UTC](https://devforum.zoom.us/t/error-in-videosdk-at-participant-side/72050/15 "2022-08-16T17:41:09Z")

</div>

Closed on August 16, 2022, 5:41pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
