# Virtual background previewView is blank after rejoining meeting and other problems

**URL:** <https://devforum.zoom.us/t/virtual-background-previewview-is-blank-after-rejoining-meeting-and-other-problems/48447>\
**Category:** iOS\
**Created:** [April 20, 2021, 11:25pm UTC](https://devforum.zoom.us/t/virtual-background-previewview-is-blank-after-rejoining-meeting-and-other-problems/48447 "2021-04-20T23:25:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![caleb.bolton](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@caleb.bolton](https://devforum.zoom.us/u/caleb.bolton)\
**Post date:** [April 20, 2021, 11:25pm UTC](https://devforum.zoom.us/t/virtual-background-previewview-is-blank-after-rejoining-meeting-and-other-problems/48447/1 "2021-04-20T23:25:51Z")

</div>

**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

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [April 21, 2021, 10:06pm UTC](https://devforum.zoom.us/t/virtual-background-previewview-is-blank-after-rejoining-meeting-and-other-problems/48447/2 "2021-04-21T22:06:56Z")

</div>

Hey @caleb.bolton,

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

> [@caleb.bolton](#):
>
> 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.

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

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![caleb.bolton](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@caleb.bolton](https://devforum.zoom.us/u/caleb.bolton)\
**Post date:** [April 21, 2021, 10:38pm UTC](https://devforum.zoom.us/t/virtual-background-previewview-is-blank-after-rejoining-meeting-and-other-problems/48447/3 "2021-04-21T22:38:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [April 22, 2021, 6:56pm UTC](https://devforum.zoom.us/t/virtual-background-previewview-is-blank-after-rejoining-meeting-and-other-problems/48447/4 "2021-04-22T18:56:50Z")

</div>

Hey @caleb.bolton,

Gotcha, let me run some tests on my end.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [April 22, 2021, 7:42pm UTC](https://devforum.zoom.us/t/virtual-background-previewview-is-blank-after-rejoining-meeting-and-other-problems/48447/5 "2021-04-22T19:42:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 23, 2021, 5:42am UTC](https://devforum.zoom.us/t/virtual-background-previewview-is-blank-after-rejoining-meeting-and-other-problems/48447/6 "2021-05-23T05:42:19Z")

</div>

Closed on May 23, 2021, 5:42am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
