Virtual background previewView is blank after rejoining meeting and other problems

Description
The previewView provided by MobileRTCMeetingService(VirtualBackground) returns a blank (but not nil) UIView under certain circumstances (see reproduction steps) and this bug is 100% reproducible in our app. There are some additional issues that may be related to this problem.

Which iOS Client SDK version?
5.4.54802.0124

To Reproduce

  1. Start a meeting as host
  2. Call startPreviewWithFrame and then use the previewView to show the preview video feed. The preview view will still be working at this point.
  3. End the meeting
  4. Start the meeting again
  5. Call startPreviewWithFrame and then use the previewView to show the preview video feed.

Result: The preview view will be a blank black view.

Additionally, there is some weird behavior surrounding the green screen setting. If the green screen virtual background is enabled at any time after ending the meeting in step 3, interfaces such as useBGImage and enableGreenVB begin returning the error MobileRTCMeetError_VBBase. However, if the green screen virtual background setting is not enabled at any point during these steps, no errors are returned and the only problem is the blank preview view.

I’ve also seen an issue intermittently where the the green screen virtual background setting is enabled (I could tell by the behavior of the background) but isUsingGreenVB returns false.

Device:

  • Device: iPad Pro (11-inch) (2nd generation)
  • OS: 14.4.1

Hey @caleb.bolton,

Thanks for using the dev forum! It is nice to see you again :slight_smile:

Is the previewView blank both times you call startPreviewWithFrame or just the second time?

Thanks!
Michael

Hey Michael,

Thanks for helping out again!

previewView is only blank the second time. However, startPreviewWithFrame and previewView seem to work properly as many times as they are used within the first meeting. previewView is a blank black UIView only during the second and subsequent meetings.

Thanks,
Caleb

Hey @caleb.bolton,

Gotcha, let me run some tests on my end.

Thanks!
Michael

Hey @caleb.bolton,

So I tested this a few times an could not reproduce the same outcome the second time I tried to show the previewView. Would you mind sharing your code for starting the meeting, as well as the code for showing the previewView? Please omit any personal data.

PS: I am not sure it matters, but I used the latest version of the SDK on an iPad Air. I will test the green screen behavior when we get this one squared away.

Thanks!
Michael