# Error in SpotlightVideo and UnSpotlightVideo

**URL:** <https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868>\
**Category:** Meeting SDK\
**Created:** [July 28, 2021, 4:29pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868 "2021-07-28T16:29:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bm.erikstad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bm.erikstad/32/3113_2.png) [@bm.erikstad](https://devforum.zoom.us/u/bm.erikstad)\
**Post date:** [July 28, 2021, 4:29pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/1 "2021-07-28T16:29:41Z")

</div>

both the functions SpotlightVideo(uint userid) and UnSpotlightVideo(uint userid) often returns error 18 (Possible SDKERR\_NO\_VIDEODEVICE\_ISFOUND ) instead of SDKERR\_SUCCESS.

C# with version 5.5.12511.0422

When this happens, a delay is needed (between 500mS and 1000mS) before the function work again.

Example of workaround :

```
    public bool SpotlightVideo(uint Id, int NumberOfTry)
    {
        ZOOM_SDK_DOTNET_WRAP.SDKError err;

        if (NumberOfTry < 1) NumberOfTry = 1;

        for (int i = 0; i < NumberOfTry; i++)
        {
            err = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().GetMeetingVideoController().SpotlightVideo(Id);
            if (err == ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS)
            {
                return true;
            }
            else
            {
                // Log.WriteInfo("SpotlightVideo on user " + Id.ToString() + " . Error = " + err);
                System.Threading.Thread.Sleep(500);
            }
        }
        return false;
    }

```

It is bad coding to fix the issue like this… Please help since this is annoing and take time…

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [July 28, 2021, 5:42pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/2 "2021-07-28T17:42:44Z")

</div>

Hey @bm.erikstad,

Thanks for using the dev forum!

At what point are you attempting to spotlight/unspotlight? Is this controlled by the UI or after a certain event?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![bm.erikstad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bm.erikstad/32/3113_2.png) [@bm.erikstad](https://devforum.zoom.us/u/bm.erikstad)\
**Post date:** [July 28, 2021, 6:41pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/3 "2021-07-28T18:41:45Z")

</div>

It is all controlled from a UI.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 4, 2021, 6:58pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/4 "2021-08-04T18:58:43Z")

</div>

Hey @bm.erikstad,

Do you receive the error the first time your call this? Or does this only happen when repeatedly calling the methods in a short time?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![bm.erikstad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bm.erikstad/32/3113_2.png) [@bm.erikstad](https://devforum.zoom.us/u/bm.erikstad)\
**Post date:** [August 12, 2021, 1:56pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/5 "2021-08-12T13:56:17Z")

</div>

Hey Michael.

It differs.  
Logging over time show that around 1/3 of all calls works on the first try.  
The rest is spread out and need 2 and some of them need 3 try to success.

I have not been able to see any pattern when it fails vs when it works just fine.

First i thougt that it was releated to partisipants turning their camera off 8would be understanable that it would fail…) but the testing show no relation here.

Is it correct that SDKERR\_NO\_VIDEODEVICE\_ISFOUND is 18 ?  
If yes, is this something that is proccessed locally on the Host computer or on Zoom Server ?

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 12, 2021, 6:47pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/6 "2021-08-12T18:47:20Z")

</div>

Hey @bm.erikstad

18 is actually [SDKERR\_TOO\_FREQUENT\_CALL](https://marketplacefront.zoom.us/sdk/meeting/windows/zoom __sdk__ def_8h.html#aea74527af3b9f22cf00d38080c896036a75d4f7918f9c861630372629233e33d6)  
Which means the method is being called too many times in a short period of time.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![bm.erikstad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bm.erikstad/32/3113_2.png) [@bm.erikstad](https://devforum.zoom.us/u/bm.erikstad)\
**Post date:** [August 24, 2021, 1:19pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/7 "2021-08-24T13:19:24Z")

</div>

Hey again.  
So, I updated the SDK to version 5.7.1.643.  
The change of onSpotlightVideoChangeNotification(uint lstSpotlightedUserID) is working very nicely.  
But i still have the SDKERR\_TOO\_FREQUENT\_CALL.  
What is ‘Too frequent’ ? Is there something that need to be finish before calling it again?  
The use case, is that 2 partisipants are spotted. these spots is to be removed and another partisipant is to be spotted. So there is a total of 3 call’s made.  
Would it be a good ide to change the SDKError SpotlightVideo(uint userid) into SDKError SpotlightVideo(uint lstuserID) to reduce the number of call’s ?

Remark : The SDKERR\_TOO\_FREQUENT\_CALL seems not to be implemented in the wrapper SDKError. The last enum is SDKERR\_OTHER\_SDK\_INSTANCE\_RUNNING.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 24, 2021, 9:09pm UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/8 "2021-08-24T21:09:53Z")

</div>

Hey @bm.erikstad,

> [@bm.erikstad](#):
>
> Would it be a good ide to change the SDKError SpotlightVideo(uint userid) into SDKError SpotlightVideo(uint lstuserID) to reduce the number of call’s ?

I am not sure if this would fix the error you are receiving, however SpotlightVideo(uint userid) is an outdated interface that was replaced by SpotlightVideo(uint lstuserID), so yes I would switch to the new one.

> [@bm.erikstad](#):
>
> Remark : The SDKERR\_TOO\_FREQUENT\_CALL seems not to be implemented in the wrapper SDKError. The last enum is SDKERR\_OTHER\_SDK\_INSTANCE\_RUNNING.

Yes, unfortunately the wrapper is provided as is and is no longer maintained by Zoom. Only the C++ SDK is actively maintained.

Thanks!  
Michael

---

<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:** [September 24, 2021, 7:10am UTC](https://devforum.zoom.us/t/error-in-spotlightvideo-and-unspotlightvideo/54868/9 "2021-09-24T07:10:31Z")

</div>

Closed on September 24, 2021, 7:10am UTC

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