Handling the active-share-change event when one joins the channel after someone shared the screen

How to handle the case, when a user is on speakerOnly mode and sharing the screen with the tab audio, how can we switch from tab audio to microphone audio?

  • I tried calling muteShareAudio then nothing is happening because the microphone audio was never started.
  • I tried calling stopAudio() and startAudio() one after another but here it threw an error of
    Cannot stop audio during sharing with audio