# Force enable/disable video when join meeting

**URL:** <https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248>\
**Category:** macOS\
**Created:** [December 12, 2020, 3:25pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248 "2020-12-12T15:25:47Z")\
**Posts on this page:** 10\
**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 12, 2020, 3:25pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/1 "2020-12-12T15:25:47Z")

</div>

**Description**  
I am integrating join meetings using Zoom Mac OS SDK. I am trying to find a function to enable/disable video while joining a meeting.  
I have a custom UI for the join meeting screen where I ask the user to turn on/off the audio and video.

 ![Screenshot 2020-12-12 at 16.20.19](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/e/ceb7cdb15f7922f1e803713674d6e7266bb78031.png)

I found these functions for audio, you can review them.

```auto
sdk.getSettingService()?.getAudioSetting()?.enableAutoJoinVoip( **true** )
sdk.getSettingService()?.getAudioSetting()?.enableMuteMicJoinVoip(!audioOn)

```

Do we have something similar for the video as well? So far I have tried these functions but nothing seems to work.

```auto
sdk.getSettingService()?.getVideoSetting()?.enableCatchHDVideo( **true** )
sdk.getSettingService()?.getVideoSetting()?.disableVideoJoinMeeting(!videoOn)
sdkMeetingService?.getMeetingUIController()?.isShowVideoPreview(whenJoinMeeting: **false** )

```

Can you please let me know how can I achieve the intended behavior?

**Which version?**  
[v5.2.42037.1112](https://github.com/zoom/zoom-sdk-macos/releases/tag/v5.2.42037.1112)

---

<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 12, 2020, 4:58pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/2 "2020-12-12T16:58:47Z")

</div>

Some additional info here:

1. audio and video settings of the user joining the meeting work as expected when the user hosting the meetings has these settings in his profile:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/9/a983d881571e175f6011e703dff05fed8a0e0b5e.png)

1. video of the user joining the meeting is always OFF when the user hosting the meeting his these settings in his profile:

![Screenshot 2020-12-12 at 17.35.48](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/5/e5bb8f9c38ebad14fc0b5d16f0f3962d248b1c7e.png)

What does it mean for us? Can the user who joins a meeting overwrite video settings of the user hosting the meeting? And how can we retrieve the setting that says the User who is joining hosting the meetings always wants me to join with video off?

Or did we get it all wrong? In this case what is overwriting the audio / video selection of the use joining a meeting and how can this be handled?

To pass on the audio / video options of he user joining a meeting we use these calls:

```auto
sdk.getSettingService()?.getAudioSetting()?.enableAutoJoinVoip( **true** )
sdk.getSettingService()?.getAudioSetting()?.enableMuteMicJoinVoip(!audioOn)

```

---

<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 14, 2020, 7:19pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/3 "2020-12-14T19:19:56Z")

</div>

Hi @j_a_z_z & @tmiskiew, thanks for the post.

To clarify, are you saying that enabling/disabling audio is working correctly, but doing the same for video is not?

```auto
sdk.getSettingService()?.getVideoSetting()?.enableCatchHDVideo( **true** )
sdk.getSettingService()?.getVideoSetting()?.disableVideoJoinMeeting(!videoOn)
sdkMeetingService?.getMeetingUIController()?.isShowVideoPreview(whenJoinMeeting: **false** )

```

> Can you please let me know how can I achieve the intended behavior?

When are you calling these methods and what are you getting for the return values? Also if you could determine the value of [this method](https://marketplacefront.zoom.us/sdk/meeting/macos/interface_zoom_s_d_k_video_setting.html#a0ec7cd881bf004e3c9818887ddfe5583) and [this method](https://marketplacefront.zoom.us/sdk/meeting/macos/interface_zoom_s_d_k_video_setting.html#aeeef52296396d59a6adebdfa73048bf4) before and after changing these settings, they may provide useful information.

> Can the user who joins a meeting overwrite video settings of the user hosting the meeting?

The settings of the meeting itself can only be changed by the host, however this does not prevent an individual user from controlling their own video.

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 15, 2020, 7:54pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/4 "2020-12-15T19:54:42Z")

</div>

Hey @jon .lieblich  
Thanks for your response.  
I added the logs in the code before and after setting the values. Please check them with function names and vlaue.

```auto
isCatchHDVideoOn: false
isMuteMyVideoWhenJoinMeetingOn: true
enableCatchHDVideo(true) result: Optional(__C.ZoomSDKError(rawValue: 3))
disableVideoJoinMeeting(false) result: Optional(__C.ZoomSDKError(rawValue: 0))
isCatchHDVideoOn: true
isMuteMyVideoWhenJoinMeetingOn: false

```

Code:

```auto
    print("isCatchHDVideoOn: \(sdk.getSettingService()?.getVideoSetting()?.isCatchHDVideoOn() ?? false)")
    print("isMuteMyVideoWhenJoinMeetingOn: \(sdk.getSettingService()?.getVideoSetting()?.isMuteMyVideoWhenJoinMeetingOn() ?? false)")
    joinMeetingCompletion = completion
    sdk.getSettingService()?.getAudioSetting()?.enableAutoJoinVoip(true)
    sdk.getSettingService()?.getAudioSetting()?.enableMuteMicJoinVoip(!audioOn)
    let hdResult = sdk.getSettingService()?.getVideoSetting()?.enableCatchHDVideo(true)
    let videoResult = sdk.getSettingService()?.getVideoSetting()?.disableVideoJoinMeeting(!videoOn)
    sdkMeetingService?.getMeetingUIController()?.isShowVideoPreview(whenJoinMeeting: false)

    print("enableCatchHDVideo(true) result: \(hdResult)")
    print("disableVideoJoinMeeting(\((!videoOn))) result: \(videoResult)")

    print("isCatchHDVideoOn: \(sdk.getSettingService()?.getVideoSetting()?.isCatchHDVideoOn() ?? false)")
    print("isMuteMyVideoWhenJoinMeetingOn: \(sdk.getSettingService()?.getVideoSetting()?.isMuteMyVideoWhenJoinMeetingOn() ?? false)")

```

Maybe it could be related to SDKError value 3, which says Service failed, but not sure what can cause it.  
Can you please review the code and let me know if I need to add/change anything. So far, I am not able to get my Video meeting working.

---

<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, 6:33pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/5 "2020-12-16T18:33:16Z")

</div>

Hi @j_a_z_z, thanks for the additional details.

It is strange to me that you are receiving this error when enabling HD video, but the property is still updated. Just to make sure we have all of our bases covered, can you confirm that your application is properly requesting the camera permission at runtime? If this is working properly, we will need to investigate this further internally.

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 16, 2020, 7:24pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/6 "2020-12-16T19:24:53Z")

</div>

Hey @jon.zoom

Thanks for your response.  
I don’t see any issues with the permissions, My app is enabled for both Mic and camera permissions in mac OS privacy & security settings.  
Also, I have the values set in my app’s info.plist file.

---

<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:38pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/7 "2020-12-16T19:38:37Z")

</div>

Hey @jon.zoom

Can you please help me one other critical topic.

> [@ZoomSDKError 4 on UI functions](https://devforum.zoom.us/t/zoomsdkerror-4-on-ui-functions/38576):
>
> 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. These are the function calls for each, 1. sdk.getMeetingService()?.getMeetingUIController()?.switchFloatVideoToMinimizeMode() 2. sdk.getMeetingService()?.getMeetingUIController()?.switchFloatVideoToActiveS…

---

<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:11pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/8 "2020-12-16T23:11:25Z")

</div>

Hi @j_a_z_z,

> I don’t see any issues with the permissions, My app is enabled for both Mic and camera permissions in mac OS privacy & security settings.

Thank you for double checking that. We will look into this and let you know as soon as we have an update.

> Can you please help me one other critical topic.

Yes, I have already responded in that thread. 🙂

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 19, 2020, 11:48am UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/9 "2020-12-19T11:48:50Z")

</div>

@jon.zoom I don’t see any permission problem here. The situation is this: [How to join internet audio?](https://devforum.zoom.us/t/how-to-join-internet-audio/38742) I hope you can enlighten us.

---

<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:56pm UTC](https://devforum.zoom.us/t/force-enable-disable-video-when-join-meeting/38248/10 "2020-12-21T18:56:50Z")

</div>

Hi @tmiskiew,

I believe this may be due to the meeting UI settings. Can you please let me know if the solution provided in your [other post](https://devforum.zoom.us/t/how-to-join-internet-audio/38742/2) is not sufficient?

Thanks
