Problems with iOS Video SDK

Video SDK Type and Version
1.9.10 iOS Video SDK

I’m doing a test integration of the Zoom Video SDK to replace the Twilio Video SDK we’ve been using for years. I’ve noticed a bunch of issues I’d like to report.

  • JoinSession must be called on main thread or certain calls will respond with Errors_Call_Too_Frequently

The SDK doesn’t appear to be thread-safe at all. It would be nice to initialize things on a non-main thread.

  • Not much documentation on what the errors mean and when they are raised.

  • videoStatus().on not updated for some time after calling videoHelper.startVideo()/stopVideo()

It would be nice to add a completion block or make the startVideo() method async so we don’t need to depend on arbitrary timeout values to update the UI state.

  • No way to stop mute/unmute sound

The SDK makes a bloop sound when muting and unmuting. I don’t see a way to disable that.

  • Tons of threading errors. AVCapture not being called on bg thread while switchCamera() checks [UIApplication statusBarOrientation]

Starting and stopping video via AVCapture should be called on a bg thread but the SDK seems to call it on the same thread the startVideo/stopVideo methods are invoked on. I can’t force a BG thread because you seem to be touching UIApplication which requires the main thread.

  • No way to get reference to in-use camera

It would be nice to be able to tell which camera is the currently active one. I’ve worked around this by listening for the AVCaptureSessionDidStartRunning notification.

  • No way to know if SDK singleton was already initialized

The demo app sets up the singleton in the app’s delegate. I would like to set it up in my own framework and so it would be nice to have a method which states whether the instance has been initialized already. Something like isInitialized(). Also, calling cleanup seems to cause a crash (EXC_BAD_ACCESS).

Hey @jason.gabriele_ih2,

The errors can be found in this link.

In most of our method calls, there is usually a ZoomVideoSDKError return type to indicate if the call is successful or not. You can use this to update the local user changes such as video, audio and etc. We also have different callbacks available for these changes under the ZoomVideoSDKDelegate.

Regarding the bloop sound and clean-up crash, kindly send me the SDK logs for me to take a look. The steps on how to enable our SDK logs can be found here.

I will check with my team regarding your other feedback and let you know whenever there is an update through the same post here.

Hello, thanks for replying

The errors can be found in this link.

This list is a start but is incomplete. ZoomVideoSDKError contains 83 errors and I’ve encountered ones like Errors_Call_Too_Frequently which have no documentation.

Regarding the bloop sound and clean-up crash, kindly send me the SDK logs for me to take a look. The steps on how to enable our SDK logs can be found here.

I tried to get enableLog to write to a log file but when I export the container, it’s empty. As for the crash, here is a backtrace:

To reproduce, take the following steps

.initialize()
.cleanup()
.initialize()
// Check the local user’s video status
ZoomVideoSDK.shareInstance().getSession()?.getMySelf().getVideoPipe()?.videoStatus()?.on

The last call will access a pointer that wasn’t cleaned up before

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x27)
    frame #0: 0x0000000121ac1c34 ZoomVideoSDK`___lldb_unnamed_symbol1781 + 68
  * frame #1: 0x0000000108dacb70 x`ZoomCameraService.recordingStatusChanged(self=0x000000028326c6c0) at ZoomCameraService.swift:172:50
    frame #2: 0x0000000108daf3fc x`protocol witness for CameraService.recordingStatusChanged() in conformance ZoomCameraService at <compiler-generated>:0
    frame #3: 0x0000000108dca1c0 x`ZoomRoomPassthrough.onUserAudioStatusChanged(helper=0x0000000280e13ab0, userArray=0 values, self=0x00000002835e0480) at ZoomRoomPassthrough.swift:301:23
    frame #4: 0x0000000108dca284 x`@objc ZoomRoomPassthrough.onUserAudioStatusChanged(_:user:) at <compiler-generated>:0
    frame #5: 0x0000000121b33a8c ZoomVideoSDK`___lldb_unnamed_symbol4256 + 412
    frame #6: 0x0000000121b0e27c ZoomVideoSDK`___lldb_unnamed_symbol3368 + 264
    frame #7: 0x0000000121b0fc60 ZoomVideoSDK`___lldb_unnamed_symbol3393 + 256
    frame #8: 0x0000000121b09850 ZoomVideoSDK`___lldb_unnamed_symbol3199 + 320
    frame #9: 0x0000000121e77ed4 ZoomVideoSDK`___lldb_unnamed_symbol18581 + 172
    frame #10: 0x0000000121e77e04 ZoomVideoSDK`___lldb_unnamed_symbol18580 + 188
    frame #11: 0x000000018a02d5d0 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
    frame #12: 0x000000018a02d278 CoreFoundation`__CFRunLoopDoTimer + 1004
    frame #13: 0x0000000189fb6e74 CoreFoundation`__CFRunLoopDoTimers + 288
    frame #14: 0x0000000189fb3e8c CoreFoundation`__CFRunLoopRun + 1856
    frame #15: 0x0000000189fb3668 CoreFoundation`CFRunLoopRunSpecific + 608
    frame #16: 0x00000001cd37e5ec GraphicsServices`GSEventRunModal + 164
    frame #17: 0x000000018c3d02b4 UIKitCore`-[UIApplication _run] + 888
    frame #18: 0x000000018c3cf8f0 UIKitCore`UIApplicationMain + 340
    frame #19: 0x000000018edd20fc SwiftUI`___lldb_unnamed_symbol172307 + 176
    frame #20: 0x000000018edd1f40 SwiftUI`___lldb_unnamed_symbol172305 + 152
    frame #21: 0x000000018ea43868 SwiftUI`___lldb_unnamed_symbol143210 + 128
    frame #22: 0x000000010421866c x`static RootApp.$main(self=x.RootApp) at <compiler-generated>:0
    frame #23: 0x00000001042188d0 x`main at RootApp.swift:7:8
    frame #24: 0x00000001aca06dcc dyld`start + 2240

Hello Jason,

You might need to shut down the app via app switcher or in the debugger in order to generate the logs. Can you please try that?

Also, regardless of the errors being returned, we should be calling all SDK methods on the main thread to prevent unexpected issues.

Thanks for your patience,
Richard