# ZoomSDKError 4 on UI functions

**URL:** <https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576>\
**Category:** macOS\
**Created:** [December 16, 2020, 7:37pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576 "2020-12-16T19:37:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [December 16, 2020, 7:37pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/1 "2020-12-16T19:37:46Z")

</div>

**Description**  
Hello, I am using the mas OS SDK to change the UI while in a meeting. It used to work earlier but now, I am getting **ZoomSDKError(rawValue: 4)** on calling these functions.

Here is the UI for buttons, I added the function call for each button for your info.

 ![viewFunctionsRemote](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/c/ec809ef4418fb562f59ef2c9799bc8926d078ed9.png)

These are the function calls for each,

```auto
1. sdk.getMeetingService()?.getMeetingUIController()?.switchFloatVideoToMinimizeMode()
2. sdk.getMeetingService()?.getMeetingUIController()?.switchFloatVideoToActiveSpeakerMode()
3. sdk.getMeetingService()?.getMeetingActionController()?.swap(toShowShareViewOrVideo: true)
4. sdk.getMeetingService()?.getMeetingUIController()?.switchFloatVideoToGalleryMode()
5. sdk.getMeetingService()?.getMeetingUIController()?.enterFullScreen(true, firstMonitor: true, dualMonitor: false)
6. sdk.getMeetingService()?.getMeetingUIController()?.showPreOrNextPageWallView(false)
7. sdk.getMeetingService()?.getMeetingUIController()?.showPreOrNextPageWallView(true)
8. switchToVideoWallView & switchToActiveSpeakerView based on UI

```

I am using a meeting that is not created by me (I am not a host) with 7 participants for testing these functions.  
Can you please review my code and let me know what can cause a ZoomSDKError 4 for this code.

Let me know if I need to consider other things while using these buttons, as I understood from the documentation these functions are not always available. Is there a way I can figure out when they are applicable for a meeting? It will help me in hide/show of buttons based on the meeting setting.

**Which version?**  
5.2.42037.1112

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 16, 2020, 11:09pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/2 "2020-12-16T23:09:40Z")

</div>

Hi @j_a_z_z, thanks for the post.

Sorry to hear you are running into these issues. Just to clarify, are you receiving that error as the return value for **all** of these methods 100% of the time?

Thanks!

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [December 17, 2020, 5:48pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/3 "2020-12-17T17:48:41Z")

</div>

Hey @jon.zoom

Thanks for your response. I get this error lot of time, but if I change the UI manually once in zoom UI, it starts to work. But it fails again after some time with error code 4.  
For button no. 4, I never got it to working. This is my code.,

```auto
let result = sdkMeetingActionController?.swap(toShowShareViewOrVideo: true)
print("swap(toShowShareViewOrVideo \(true)) result: \(String(describing: result))")

```

I noticed `sdkMeetingActionController?.canSwapToShowShareViewOrVideo()` always return false for me.

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [December 17, 2020, 5:50pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/4 "2020-12-17T17:50:29Z")

</div>

Also, can you please let me know, If there is a callback from Zoom SDK when somebody started screen sharing. I would like to show button number 4 only when some body is sharing screen,  
Similar to Zoom app behaviour.

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 19, 2020, 11:46am UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/5 "2020-12-19T11:46:44Z")

</div>

There question here @jon.zoom is what are the prerequisites for those calls to work. Full screen? Someone sharing screen? Gallery mode?

For some reason 1, 2 and 3 work only when someone is sharing the screen and don’t work in other cases. That’s not how this behaves in the original zoom app. What are we missing here?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 21, 2020, 6:49pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/6 "2020-12-21T18:49:00Z")

</div>

Hi @j_a_z_z and @tmiskiew,

Based on the information in your [other post](https://devforum.zoom.us/t/how-to-manipulate-the-floating-panel/38747), I suspect that this is due to there not being an active screen share when calling these methods. Please let me know if you see the error for any of these while a screen is being shared and we can look into this further.

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 21, 2020, 7:03pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/7 "2020-12-21T19:03:28Z")

</div>

In the original zoom client these buttons work when the floating panel appears on the right, i.e. I don’t have to share screen for them to work. Do you agree with me on this? So again how can we find out why they’re not working we called the way as specified above?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 21, 2020, 10:58pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/8 "2020-12-21T22:58:27Z")

</div>

Hi @tmiskiew,

That is a great point, however I noticed that there are slight differences in functionality between those two panels. Please allow me to follow up on this internally. Either we’re both missing something here, or I need to submit a feature request to achieve parity with the client. I’ll let you know which path we end up needing to take. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 21, 2020, 11:15pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/9 "2020-12-21T23:15:27Z")

</div>

Not sure which two panels and what differences you’re referring to. Please elaborate.

We had a discussion about this with your colleague here [Is there an interface for next page of Float Video?](https://devforum.zoom.us/t/is-there-an-interface-for-next-page-of-float-video/33828) and here [Seeking floating panel interfaces](https://devforum.zoom.us/t/seeking-floating-panel-interfaces/25968/7) and here [Is there an interface for next page of Float Video?](https://devforum.zoom.us/t/is-there-an-interface-for-next-page-of-float-video/33828/2)

While he mentioned the correct interface and while some of the interfaces were added in the mean time they don’t work as intended! Again please refer to the original zoom client and take note that when you’re in a meeting with a bunch of participants the floating panel with appear on the right hand side and all the floating panel interfaces work whether someone is sharing or not.

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 21, 2020, 11:16pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/10 "2020-12-21T23:16:54Z")

</div>

BTW one feature request that you could please raise it to add an interface for no 4 from this post [Is there an interface for next page of Float Video?](https://devforum.zoom.us/t/is-there-an-interface-for-next-page-of-float-video/33828/2)

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 22, 2020, 9:08pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/11 "2020-12-22T21:08:07Z")

</div>

Hi @tmiskiew,

> While he mentioned the correct interface and while some of the interfaces were added in the mean time they don’t work as intended

I’m sorry, have you identified problems in addition to the issues discussed earlier in this thread? If you have, please let me know what the specific behavior/reproduction steps are so that we may take this into consideration while we investigate.

> BTW one feature request that you could please raise it to add an interface for no 4 from this post [Is there an interface for next page of Float Video?](https://devforum.zoom.us/t/is-there-an-interface-for-next-page-of-float-video/33828/2)

I believe the feature you are referring to was introduced in our SDK release last month through [this method](https://marketplacefront.zoom.us/sdk/meeting/macos/interface_zoom_s_d_k_meeting_u_i_controller.html#a6c914aeaed453884adbf1c0bfaf5ea43). Please let me know if this is not functioning as expected.

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 22, 2020, 9:24pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/12 "2020-12-22T21:24:05Z")

</div>

I have said time and again that the calls switchFloatVideo\* are not working. As I said in the original zoom client you can manipulate those buttons on the floating panel no matter if someone is sharing or not but with the SDK they only work when someone is sharing. This doesn’t make any sense. It’s a bug. Think about it why does the client display those buttons when there is no way to press them? Can do do us a favor and report that behaviour as a bug? Or shall we join a zoom call for me to demonstrate this to you?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 22, 2020, 11:39pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/13 "2020-12-22T23:39:47Z")

</div>

Hi @tmiskiew,

I have already informed you that we are looking into the issues originally posted in this thread. My previous reply was asking if you had encountered any **additional** issues, not to restate topics that are already being investigated.

If you have additional information, please let me know so that we can take it into consideration while we investigate. As a reminder, it is important to keep our [community guidelines](https://devforum.zoom.us/faq) in mind while using the dev forum so that we can ensure a great experience for all users. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [January 6, 2021, 10:45am UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/14 "2021-01-06T10:45:36Z")

</div>

@jon.zoom were you able to confirm that switchFloatVideo\* interfaces don’t work as expected?

Please check these screenshots. A meeting with 27 participants. In full screen mode the floating panel appears on the right hand side. I can manipulate the appearance of the bar using the mouse without problems no matter whether someone is sharing his screen or not.

 ![zoom_floating_video_window_and_Item-0_and_Item-0_and_Item-0](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/5/45ea6892465588a5e62a84f6cb8fb6aacbdf554c.jpeg)

However when I try to press those buttons programmatically I only get the ZoomSDKError 4

 ![Floating Interfaces 2](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/5/c55a79faa207ffb4fc5806812061373cff4de70a.png)

Logs: [https://miskiewicz.s3.eu-central-1.amazonaws.com/zoom/Remote+for+Zoom.zip](https://miskiewicz.s3.eu-central-1.amazonaws.com/zoom/Remote+for+Zoom.zip)

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 7, 2021, 12:55am UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/15 "2021-01-07T00:55:51Z")

</div>

Hi @tmiskiew,

In our latest SDK release, we have added some fixes related to the float video mode. Have you had a chance to upgrade to v5.4.54518.1229 yet?

If this is still not working in the latest version, please let me know so that we can investigate this ASAP.

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [January 7, 2021, 6:40pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/16 "2021-01-07T18:40:47Z")

</div>

Hi @jon.zoom - I can confirm that the latest version solved this problem. Big thanks!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 7, 2021, 10:24pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/17 "2021-01-07T22:24:49Z")

</div>

Really glad to hear we got this one figured out!

Please don’t hesitate to reach back out for help with any other issues.

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [January 10, 2021, 4:21pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/18 "2021-01-10T16:21:34Z")

</div>

@jon.zoom there is one more thing!

How we can find out the (initial) state of these buttons?

![Screenshot 2021-01-10 at 17.15.53](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/1/112bef7fbb7014a5074b32e47cd05c4798776b7f.png)

And can you tell me if there are interfaces for flipping through participants in the floating and the top bar panel?

 ![Zoom_Meeting___top_bar](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/e/ae9e1afe6efaba95829115ba53906aab87f6f2a8.png)

 ![zoom_floating_video_window_and_AppleBluetoothExtra_and_AirPortExtra_and_DisplaysExtra_and_AppleClockExtra 2](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/7/27c675532cceb64112515f09594a3f0a4eb27b2a.jpeg)

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [January 12, 2021, 7:44pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/19 "2021-01-12T19:44:44Z")

</div>

Hey @jon.zoom,

Related to similar topic, I am looking for two callbacks from Zoom SDK, if they are already present somewhere in SDK.

1. Callback when the left floating panel with button 1,2,3, 4 appears. May be a delegate in SDK which I can listen to. I want to show the buttons in the app, only when they are visible in Zoom UI.
2. Callback when Zoom UI full screen state changes, I figured that when a user is already sharing the screen and I join that meeting, zoom app automatically move me to full screen which results in incorrect button state ☹

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [January 12, 2021, 7:50pm UTC](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576/20 "2021-01-12T19:50:35Z")

</div>

1 more feedback for button 4

I found a property on `ZoomSDKMeetingActionController`

```auto
/**
     * @brief Determine if the user can swap to show sharing screen or video now.
     * @return YES means can, otherwise not.
     */
    open func canSwapToShowShareViewOrVideo() -> Bool

```

I am getting this as false for my user, will this property value change when somebody started a screen share and button 4 is visible in zoom UI?  
I can use this to show hide button 4 initially, but when somebody shared the screen and it is updated, I could not find any callback for it.

Looking forward for some nice updates from you! 🙂

[Next page](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576.md?page=2)
