=== Precondition ====
We use Zoom Meetings SDK for iOS (v6.1.10.17500)
The issue occurs on all iOS versions
We broadcast the entire device screen (not a separate UIView)
custom UI is used
=== App Overview ===
In our app, we use the Zoom Meeting SDK:
- to join Zoom meetings
- to share the device screen during a meeting
We also use SFSpeechRecognizer to perform actions based on voice commands.
Additionally, we support a wired shutter device.
Both Apple’s speech recognizer and Zoom screen sharing work simultaneously.
Since SFSpeechRecognizer is designed for short sessions, we restart it every minute.
During this restart and in some other parts of the app, we previously forced a specific AVAudioSession configuration.
=== Initial Issue ===
Our customers reported that Zoom screen sharing started dropping frequently.
In our debug logs (via MobileRTCScreenShareServiceDelegate), we see the following errors:
- “Live Broadcasting to XXX Screen Sharing has stopped due to: Attempted to start an invalid broadcast session”
- “broadcast error: domain: us.zoom.screenbroadcasting, errorCode: 1000, reason: You have stopped screen sharing, localizedDesc: Operation was unsuccessful”
P.S.:
Issue happening during screen share sending.
=== First Round of Fixes ===
During testing, we discovered that our custom AVAudioSession configuration caused screen sharing to drop.
We removed all custom AVAudioSession configuration and delegated this responsibility to the Zoom SDK and iOS.
This fixed the screen-sharing issue.
However, a new issue appeared (see below).
=== Echo Issue ===
During a Zoom meeting:
- The Zoom client runs on a MacBook
- Our app runs on an iPhone
- Both devices are in the same room
This results in an echo.
=== Fixes We Tried ===
Using headphones on the MacBook → This helps, but it’s not an acceptable solution.
Calling enableEchoCancellation(true) → isSupportEchoCancellation returns false on our devices.
Muting the iPhone microphone via muteMyAudio(true) → This stops SFSpeechRecognizer from working.
Considering using Zoom Raw Data API as an audio source for both Zoom and SFSpeechRecognizer, but we would prefer a simpler solution if possible.
=== Question ===
Do you have any recommendations on how to resolve the echo issue while keeping:
- Screen sharing stable
- SFSpeechRecognizer working