# Black video in active video unit (Custom UI)

**URL:** <https://devforum.zoom.us/t/black-video-in-active-video-unit-custom-ui/138281>\
**Category:** Android\
**Created:** [October 27, 2025, 6:38am UTC](https://devforum.zoom.us/t/black-video-in-active-video-unit-custom-ui/138281 "2025-10-27T06:38:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AvinashUmmagani](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/avinashummagani/32/71946_2.png) [@AvinashUmmagani](https://devforum.zoom.us/u/AvinashUmmagani)\
**Post date:** [October 27, 2025, 6:38am UTC](https://devforum.zoom.us/t/black-video-in-active-video-unit-custom-ui/138281/1 "2025-10-27T06:38:13Z")

</div>

**Description**

We’re encountering an issue when removing and re-adding the active video unit to the default video view in the Zoom Android Meeting SDK.

We modified the sample app provided in the SDK ZIP to match our use case, and the issue is reproducible with the sample app as well.

**Issue Summary**

By default, the app displays the active speaker view in the default video view.

- When a user taps on another participant’s video, we pin that user’s video to the default video view using `addAttendeeVideoUnit(userId, info)`.

- When the user taps the same participant’s video again, it should unpin and switch back to the active speaker view by calling `removeAllVideoUnits()` followed by `addActiveVideoUnit()`.

- After switching back to the active video unit, the video turns black, but the audio and participant name update correctly.

**Which Android Meeting SDK version?**  
Meeting SDK for android - 6.6.5

**To Reproduce**  
Steps to reproduce the behavior:

1. Use the **Zoom Meeting SDK for Android (v6.6.5)** sample app.
2. Modify the default video view’s click listener to **toggle** between pinned user video (`addAttendeeVideoUnit`) and active speaker view (`addActiveVideoUnit`).
3. Join a meeting with at least 4 participants.
4. Tap a user’s video to pin them, then tap again to unpin and revert to the active speaker view.
5. The default video view becomes **black** , though audio and name labels continue to update correctly.

**Device Info:**

- Device: Android phone/device
- OS: Android 11

---

<div class="post-metadata">

**Author:** ![AvinashUmmagani](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/avinashummagani/32/71946_2.png) [@AvinashUmmagani](https://devforum.zoom.us/u/AvinashUmmagani)\
**Post date:** [October 27, 2025, 6:43am UTC](https://devforum.zoom.us/t/black-video-in-active-video-unit-custom-ui/138281/2 "2025-10-27T06:43:56Z")

</div>

**Modifications**

MyMeetingActivity.java  
`AttenderVideoAdapter.ItemClickListener pinVideoListener = new AttenderVideoAdapter.ItemClickListener() {`  
` @Override`  
` public void onItemClick(View view, int position, long userId) {`  
` if (currentLayoutType == LAYOUT_TYPE_VIEW_SHARE) {`  
` return;`  
` }`  
` mDefaultVideoViewMgr.removeAllVideoUnits();`  
` MobileRTCVideoUnitRenderInfo renderInfo = new MobileRTCVideoUnitRenderInfo(0, 0, 100, 100);`  
` if (currentPinUser == userId) {`  
` mDefaultVideoViewMgr.addActiveVideoUnit(renderInfo);`  
` currentPinUser = 0;`  
` } else {`  
` mDefaultVideoViewMgr.addAttendeeVideoUnit(userId, renderInfo);`  
` currentPinUser = userId;`  
` }`  
` }`  
`};`

AttenderVideoAdapter.java  
`private View.OnClickListener onClickListener = new View.OnClickListener() {`  
` @Override`  
` public void onClick(View view) {`  
` Long userId = (Long) view.getTag();`  
` int position = userList.indexOf(userId);`  
` if (userId == getSelectedUserId()) {`  
` listener.onItemClick(view, position, userId);`  
` selected = -1;`  
` return;`  
` }`  
` if (null != listener) {`  
` if (position >= userList.size()) {`  
` return;`  
` }`  
` listener.onItemClick(view, position, userId);`  
` if (null != selectedView) {`  
` selectedView.setBackgroundResource(0);`  
` }`  
` view.setBackgroundResource(R.drawable.video_bg);`  
` selectedView = view;`  
` selected = position;`  
` }`  
` }`  
`};`

---

<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:** [October 27, 2026, 6:44am UTC](https://devforum.zoom.us/t/black-video-in-active-video-unit-custom-ui/138281/3 "2026-10-27T06:44:50Z")

</div>

Closed on October 27, 2026, 6:44am UTC

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