# Video resize issue on iOS

**URL:** <https://devforum.zoom.us/t/video-resize-issue-on-ios/4926>\
**Category:** iOS\
**Created:** [July 8, 2019, 2:51pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926 "2019-07-08T14:51:35Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgarg](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@sgarg](https://devforum.zoom.us/u/sgarg)\
**Post date:** [July 8, 2019, 2:51pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/1 "2019-07-08T14:51:35Z")

</div>

We are using Zoom’s custom UI API on iOS and it looks like Zoom SDK is scaling-up the call video to fill the entire screen area (which crops parts of it). How can we make it scale-down to show the full video (with black bars to fill the empty space)?

**Portrait Screenshot** , shows full hand:

 ![PNG](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/4/4c0004b82cac71f9e48a9ee49c393d4ea28fbefd.jpeg)

**Landscape Screenshot** , shows Zoom video using the full horizontal width but only the middle of hand, fingers on top and palm at bottom is cropped out:

 ![PNG](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/ab6798fad324071e8e493474190c8a3994e8b137.jpeg)

**Custom size** , Zoom video using the full horizontal width, buy only shows only the middle of hand. Fingers on top and palm at bottom is cropped out:

 ![PNG](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/ab76b561a091366ccf75575d67be51e85b7109f9.jpeg)

Is there a way to tell Zoom SDK to resize the video to show full video by scaling it down, instead of scaling it up and cropping out parts of it?

We are using Zoom’s custom UI API on iOS with the UI code from Zoom’s Sample app (v4.3.47201.0322).

---

<div class="post-metadata">

**Author:** ![Murray\_Li](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murray_li/32/58_2.png) [@Murray\_Li](https://devforum.zoom.us/u/Murray_Li)\
**Post date:** [July 9, 2019, 7:13am UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/2 "2019-07-09T07:13:21Z")

</div>

Hi Sgarg

You can use this function control the scaling of video. u can have a try.

/\*!

**@brief** Designated for changing video aspect according to customer’s requirement.

\*/

- (void)setVideoAspect:(MobileRTCVideoAspect)aspect;

Thanks for using our SDK.

---

<div class="post-metadata">

**Author:** ![sgarg](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@sgarg](https://devforum.zoom.us/u/sgarg)\
**Post date:** [July 13, 2019, 3:20pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/3 "2019-07-13T15:20:33Z")

</div>

We tried setting setVideoAspect API to MobileRTCVideoAspect\_LetterBox and it did fix the view - but only for a few seconds. Something made it switch back to MobileRTCVideoAspect\_PanAndScan.

When we call setVideoAspect API, we see this in log which is correct as mode 2 is for MobileRTCVideoAspect\_LetterBox:  
`[CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d66c730, mode:2`

But then something else causes this to show up in the log, while we couldn’t find anything in code setting mode to 3 (for MobileRTCVideoAspect\_PanAndScan):  
`[CmmVideoSessionMgr::SetAspectMode] hwnd:0x10cad5790, mode:3`

We looked for all calls to setVideoAspect in the demo app included with Zoom SDK and changed all setVideoAspect calls to MobileRTCVideoAspect\_LetterBox, including for the thumbnail views.

On orientation change, we tried adding our call to setVideoAspect for MobileRTCVideoAspect\_LetterBox in two timers with a delay of 2 and 11 seconds. Still each time Zoom SDK resets the view back to MobileRTCVideoAspect\_PanAndScan after few seconds.

**Log** , important lines are highlighted:

> 2019-07-13 19:39:31.702850+0530 VirtualVisit[540:72398] **onOrientationDidChange**  
> 2019-07-13 19:39:31.707968+0530 VirtualVisit[540:72398] viewWillLayoutSubviews  
> 2019-07-13 19:39:31.708268+0530 VirtualVisit[540:72398] viewDidLayoutSubviews  
> 2019-07-13 19:39:31.737642+0530 VirtualVisit[540:72398] showAttendeeVideo inside thumbview  
> [540:771:07-13/19:39:31.745:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d66c730, mode:2  
> [540:771:07-13/19:39:31.745:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x10d66d8b0, render\_window:0x10d66c730, configuration:2  
> 2019-07-13 19:39:31.789149+0530 VirtualVisit[540:72398] showAttendeeVideo inside thumbview  
> [540:771:07-13/19:39:31.789:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d3cd430, mode:2  
> [540:771:07-13/19:39:31.789:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x10d3cdf20, render\_window:0x10d3cd430, configuration:2  
> [540:771:07-13/19:39:31.845:INFO:CmmVideoSessionMgr.cpp(948)] CmmVideoRender::RunRender, ret:0, device:0x0, render:0x103eaf9d0, video\_size:2, user\_id:16778240  
> [540:771:07-13/19:39:31.862:INFO:CmmVideoSessionMgr.cpp(167)] CmmVideoDeviceController::RotateDevice, ret=0  
> 2019-07-13 19:39:31.868591+0530 VirtualVisit[540:72398] viewWillLayoutSubviews  
> 2019-07-13 19:39:31.868706+0530 VirtualVisit[540:72398] viewDidLayoutSubviews  
> 2019-07-13 19:39:31.868950+0530 VirtualVisit[540:72398] showAttendeeVideo inside thumbview  
> [540:771:07-13/19:39:31.869:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d66c730, mode:2  
> [540:771:07-13/19:39:31.869:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x10d66d8b0, render\_window:0x10d66c730, configuration:2  
> 2019-07-13 19:39:31.872937+0530 VirtualVisit[540:72398] showAttendeeVideo inside thumbview  
> [540:771:07-13/19:39:31.873:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d3cd430, mode:2  
> [540:771:07-13/19:39:31.873:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x10d3cdf20, render\_window:0x10d3cd430, configuration:2  
> 2019-07-13 19:39:31.899704+0530 VirtualVisit[540:72398] [App] if we’re in the real pre-commit handler we can’t actually add any new fences due to CA restriction  
> 2019-07-13 19:39:31.899821+0530 VirtualVisit[540:72398] [App] if we’re in the real pre-commit handler we can’t actually add any new fences due to CA restriction  
> [540:771:07-13/19:39:31.978:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:31.978:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 10 len\_of\_list: 1  
> [540:771:07-13/19:39:31.978:INFO:CmmVideoSessionMgr.cpp(3580)] [CmmVideoSessionMgr::HandleuplinkStatusChanged] user: t1 t1, network level:5  
> [540:771:07-13/19:39:31.978:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:31.979:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 0  
> 2019-07-13 19:39:31.979751+0530 VirtualVisit[540:72398] statusBarDidChangeFrame changed (null)  
> 2019-07-13 19:39:31.979963+0530 VirtualVisit[540:72398] viewWillLayoutSubviews  
> 2019-07-13 19:39:31.980016+0530 VirtualVisit[540:72398] viewDidLayoutSubviews  
> 2019-07-13 19:39:32.236041+0530 VirtualVisit[540:72398] statusBarDidChangeFrame changed (null)  
> 2019-07-13 19:39:32.779258+0530 VirtualVisit[540:72398] **In resizeZoomviewAndWebview**  
> 2019-07-13 19:39:32.783529+0530 VirtualVisit[540:72398] showAttendeeVideo inside thumbview  
> [540:771:07-13/19:39:32.791:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d66c730, mode:2  
> [540:771:07-13/19:39:32.792:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x10d66d8b0, render\_window:0x10d66c730, configuration:2  
> 2019-07-13 19:39:32.796910+0530 VirtualVisit[540:72398] showAttendeeVideo inside thumbview  
> [540:771:07-13/19:39:32.797:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d3cd430, mode:2  
> [540:771:07-13/19:39:32.797:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x10d3cdf20, render\_window:0x10d3cd430, configuration:2  
> 2019-07-13 19:39:32.801878+0530 VirtualVisit[540:72398] showAttendeeVideo inside thumbview  
> [540:771:07-13/19:39:32.802:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d66c730, mode:2  
> [540:771:07-13/19:39:32.802:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x10d66d8b0, render\_window:0x10d66c730, configuration:2  
> 2019-07-13 19:39:32.824275+0530 VirtualVisit[540:72398] showAttendeeVideo inside thumbview  
> [540:771:07-13/19:39:32.824:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10d3cd430, mode:2  
> [540:771:07-13/19:39:32.824:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x10d3cdf20, render\_window:0x10d3cd430, configuration:2  
> [540:771:07-13/19:39:32.980:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:32.980:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 11 len\_of\_list: 1  
> [540:771:07-13/19:39:32.980:INFO:CmmVideoSessionMgr.cpp(3441)] [CmmVideoSessionMgr::HandleDownLinkStatusChanged] Receiver16779265level4  
> [540:771:07-13/19:39:32.980:INFO:CmmVideoSessionMgr.cpp(3474)] [CmmVideoSessionMgr::HandleDownLinkStatusChanged] Sender: t3 t3, up level:4, my downlink:4  
> [540:771:07-13/19:39:32.981:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:32.981:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 1  
> **2019-07-13 19:39:34.971479+0530 VirtualVisit[540:72398] After 2 sec delay: setVideoAspect:MobileRTCVideoAspect\_LetterBox**  
> **[540:771:07-13/19:39:34.971:INFO:CmmVideoSessionMgr.cpp(5111)]  
> [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10cad5790, mode:2**  
> [540:771:07-13/19:39:34.971:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x103eaf9d0, render\_window:0x10cad5790, configuration:2  
> [540:771:07-13/19:39:36.880:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 0  
> [540:771:07-13/19:39:37.220:INFO:SSBConfIPCListener.cpp(499)] [CSSBPTIPCListener::PumpMessage] i = 1009, message size = 0  
> [540:771:07-13/19:39:37.938:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 1  
> [540:771:07-13/19:39:39.432:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:39.432:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 9 len\_of\_list: 1  
> [540:771:07-13/19:39:39.432:INFO:CmmVideoSessionMgr.cpp(3603)] [CmmVideoSessionMgr::HandleVideoSizeChanged] len\_of\_list: 1  
> [540:771:07-13/19:39:39.432:INFO:CmmVideoSessionMgr.cpp(3625)] [CmmVideoSessionMgr::HandleVideoSizeChanged] userid: 16778241, resolution:31457640, fps:2199023255564, bt:2147483810805  
> [540:771:07-13/19:39:39.432:INFO:SBConfUI.mm(176)] [CSBConfUI::OnUserStatusChanged] cmd:17 userId:16778241  
> [540:771:07-13/19:39:39.433:INFO:CmmConfMgr.cpp(3623)] [CmmConfMgr::GetClientUserCount()] count 2  
> **\> [540:771:07-13/19:39:39.433:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10cad5790, mode:3**  
> [540:771:07-13/19:39:39.433:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x103eaf9d0, render\_window:0x10cad5790, configuration:2  
> [540:771:07-13/19:39:39.436:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:41.980:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:41.981:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 10 len\_of\_list: 1  
> [540:771:07-13/19:39:41.981:INFO:CmmVideoSessionMgr.cpp(3580)] [CmmVideoSessionMgr::HandleuplinkStatusChanged] user: t1 t1, network level:4  
> [540:771:07-13/19:39:41.981:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:41.981:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 0  
> [540:771:07-13/19:39:43.180:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:43.180:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 11 len\_of\_list: 1  
> [540:771:07-13/19:39:43.180:INFO:CmmVideoSessionMgr.cpp(3441)] [CmmVideoSessionMgr::HandleDownLinkStatusChanged] Receiver16779265level5  
> [540:771:07-13/19:39:43.181:INFO:CmmVideoSessionMgr.cpp(3474)] [CmmVideoSessionMgr::HandleDownLinkStatusChanged] Sender: t3 t3, up level:4, my downlink:5  
> [540:771:07-13/19:39:43.181:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:43.181:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 1  
> **2019-07-13 19:39:44.821534+0530 VirtualVisit[540:72398] After 11 sec delay: setVideoAspect:MobileRTCVideoAspect\_LetterBox**  
> **[540:771:07-13/19:39:44.821:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10cad5790, mode:2**  
> [540:771:07-13/19:39:44.822:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x103eaf9d0, render\_window:0x10cad5790, configuration:2  
> [540:771:07-13/19:39:45.730:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:45.730:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 9 len\_of\_list: 1  
> [540:771:07-13/19:39:45.730:INFO:CmmVideoSessionMgr.cpp(3603)] [CmmVideoSessionMgr::HandleVideoSizeChanged] len\_of\_list: 1
> 
> [540:771:07-13/19:39:45.731:INFO:CmmVideoSessionMgr.cpp(3625)] [CmmVideoSessionMgr::HandleVideoSizeChanged] userid: 16779265, resolution:23593440, fps:7305739370513, bt:21852794231431  
> [540:771:07-13/19:39:45.731:INFO:SBConfUI.mm(176)] [CSBConfUI::OnUserStatusChanged] cmd:17 userId:16779265  
> [540:771:07-13/19:39:45.731:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:46.930:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:46.930:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 10 len\_of\_list: 1  
> [540:771:07-13/19:39:46.930:INFO:CmmVideoSessionMgr.cpp(3580)] [CmmVideoSessionMgr::HandleuplinkStatusChanged] user: t1 t1, network level:1  
> [540:771:07-13/19:39:46.930:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:46.931:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 0  
> [540:771:07-13/19:39:47.080:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:47.080:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 9 len\_of\_list: 1  
> [540:771:07-13/19:39:47.082:INFO:CmmVideoSessionMgr.cpp(3603)] [CmmVideoSessionMgr::HandleVideoSizeChanged] len\_of\_list: 1  
> [540:771:07-13/19:39:47.082:INFO:CmmVideoSessionMgr.cpp(3625)] [CmmVideoSessionMgr::HandleVideoSizeChanged] userid: 16779265, resolution:31457920, fps:7391638716430, bt:22217866343081  
> [540:771:07-13/19:39:47.082:INFO:SBConfUI.mm(176)] [CSBConfUI::OnUserStatusChanged] cmd:17 userId:16779265  
> [540:771:07-13/19:39:47.082:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:48.282:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:48.283:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 11 len\_of\_list: 1  
> [540:771:07-13/19:39:48.283:INFO:CmmVideoSessionMgr.cpp(3441)] [CmmVideoSessionMgr::HandleDownLinkStatusChanged] Receiver16779265level4  
> [540:771:07-13/19:39:48.283:INFO:CmmVideoSessionMgr.cpp(3474)] [CmmVideoSessionMgr::HandleDownLinkStatusChanged] Sender: t3 t3, up level:4, my downlink:4  
> [540:771:07-13/19:39:48.283:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:48.283:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 1  
> [540:771:07-13/19:39:50.830:INFO:CmmLogging.h(965)] Function [CmmVideoSessionMgr::on\_user\_status] started ================\>\>\>  
> [540:771:07-13/19:39:50.831:INFO:CmmVideoSessionMgr.cpp(3636)] [CmmVideoSessionMgr::on\_user\_status] user\_status: 9 len\_of\_list: 1  
> [540:771:07-13/19:39:50.831:INFO:CmmVideoSessionMgr.cpp(3603)] [CmmVideoSessionMgr::HandleVideoSizeChanged] len\_of\_list: 1  
> [540:771:07-13/19:39:50.831:INFO:CmmVideoSessionMgr.cpp(3625)] [CmmVideoSessionMgr::HandleVideoSizeChanged] userid: 16778241, resolution:41943520, fps:2761663971339, bt:3981435038233  
> [540:771:07-13/19:39:50.832:INFO:SBConfUI.mm(176)] [CSBConfUI::OnUserStatusChanged] cmd:17 userId:16778241  
> [540:771:07-13/19:39:50.832:INFO:CmmConfMgr.cpp(3623)] [CmmConfMgr::GetClientUserCount()] count 2  
> **[540:771:07-13/19:39:50.832:INFO:CmmVideoSessionMgr.cpp(5111)] [CmmVideoSessionMgr::SetAspectMode] hwnd:0x10cad5790, mode:3**  
> [540:771:07-13/19:39:50.832:INFO:CmmVideoSessionMgr.cpp(1085)] CmmVideoRender::ConfigRender, render\_hande:0x103eaf9d0, render\_window:0x10cad5790, configuration:2  
> [540:771:07-13/19:39:50.833:INFO:CmmLogging.h(969)] \<\<\<==================Function [CmmVideoSessionMgr::on\_user\_status] Ended.  
> [540:771:07-13/19:39:51.880:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 0  
> [540:771:07-13/19:39:53.230:INFO:CmmVideoSessionMgr.cpp(3700)] [CmmVideoSessionMgr::on\_session\_event] session\_event: 1

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [July 17, 2019, 8:10pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/4 "2019-07-17T20:10:34Z")

</div>

Hi sgarg,

Thanks for your reply and the information. We do not have anything that will force the aspect to change back to MobileRTCVideoAspect\_PanAndScan. (Otherwise, it makes no sense of allowing to change the aspect) Thus the behavior you are experiencing is a little bit strange.

We have 3 different locations that set the aspect to MobileRTCVideoAspect\_PanAndScan in our demo app:

- [https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/CustomMeetingViewController.m#L143](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/CustomMeetingViewController.m#L143)
- [https://github.com/zoom/zoom-sdk-ios/blob/f3a734324db65a99b9b578b2b25f0d3b2a2ba10e/MobileRTCSample/MobileRTCSample/CustomMeeting/VideoViewController.m#L52](https://github.com/zoom/zoom-sdk-ios/blob/f3a734324db65a99b9b578b2b25f0d3b2a2ba10e/MobileRTCSample/MobileRTCSample/CustomMeeting/VideoViewController.m#L52)
- [https://github.com/zoom/zoom-sdk-ios/blob/f3a734324db65a99b9b578b2b25f0d3b2a2ba10e/MobileRTCSample/MobileRTCSample/CustomMeeting/ThumbView.m#L331](https://github.com/zoom/zoom-sdk-ios/blob/f3a734324db65a99b9b578b2b25f0d3b2a2ba10e/MobileRTCSample/MobileRTCSample/CustomMeeting/ThumbView.m#L331)

You may refer to the above implementation. In the meantime, I will work with the engineer trying to find the root cause and get back to you.

Thanks!

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [July 18, 2019, 4:04am UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/5 "2019-07-18T04:04:17Z")

</div>

Hi,

Thanks for providing the details. Are you using `MobileRTCActiveVideoView`? Try to change it to `MobileRTCVideoView` should fix this issue.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![sgarg](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@sgarg](https://devforum.zoom.us/u/sgarg)\
**Post date:** [August 6, 2019, 1:10pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/6 "2019-08-06T13:10:15Z")

</div>

Unfortunately we are still facing this issue.

We have updated to Zoom iOS SDK v4.4.55130.0712.

Changed all references of MobileRTCVideoAspect\_PanAndScan to MobileRTCVideoAspect\_LetterBox.

Tried using `MobileRTCVideoView` instead of `MobileRTCActiveVideoView`.

---

<div class="post-metadata">

**Author:** ![sgarg](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@sgarg](https://devforum.zoom.us/u/sgarg)\
**Post date:** [August 6, 2019, 1:13pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/7 "2019-08-06T13:13:42Z")

</div>

Problem only occurs when both sending-device and receiving-device are in different orientations.

If both devices are landscape or portrait, then `[videoView setVideoAspect:MobileRTCVideoAspect_LetterBox];` is respected.

Otherwise, Zoom SDK switches it back to `MobileRTCVideoAspect_PanAndScan` after a few seconds.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 6, 2019, 5:08pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/8 "2019-08-06T17:08:04Z")

</div>

Hi sgarg,

Thanks for the reply. We tried the same behavior with our sample app we are not able to reproduce the issue you are facing. We change the code in: [https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/ThumbView.m#L331](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/ThumbView.m#L331) from PanAndScan to LetterBox, and we see the expected behavior. Could you have a try with our demo?

Do you want to zoom and enlarge the video or do you want to leave the black blocks around the video screen?

Thanks!

---

<div class="post-metadata">

**Author:** ![sgarg](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@sgarg](https://devforum.zoom.us/u/sgarg)\
**Post date:** [August 13, 2019, 2:02pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/9 "2019-08-13T14:02:45Z")

</div>

We want to leave the black blocks around the video. I will try to reproduce this with demo app.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 13, 2019, 6:28pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/10 "2019-08-13T18:28:26Z")

</div>

Hi sgarg,

Thanks for the reply. Please let us know once you are able to reproduce this with the demo app.

Have a wonderful day.

---

<div class="post-metadata">

**Author:** ![sgarg](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@sgarg](https://devforum.zoom.us/u/sgarg)\
**Post date:** [August 19, 2019, 8:08pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/11 "2019-08-19T20:08:50Z")

</div>

We are able to reproduce the same issue with demo app. I have created a small video of this issue: [https://www.youtube.com/watch?v=KJCzFkEkGC8](https://www.youtube.com/watch?v=KJCzFkEkGC8)

**Code changes:**  
Changed from `MobileRTCVideoAspect_PanAndScan` to `MobileRTCVideoAspect_LetterBox` at 3 places in demo code (also tried with changing only at ThumbView.m#L331 as you suggested above):

CustomMeetingViewController.m - [Line 143](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/CustomMeetingViewController.m#L143)  
ThumbView.m - [Line 331](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/ThumbView.m#L331)  
VideoViewController.m - [Line 52](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/VideoViewController.m#L52)

**Video**  
On the left is Android device running Zoom app from Play Store.  
On the right is Zoom iOS SDK demo app - this should stay in letterbox always.

When the left Android device is portrait, then the right iOS SDK demo app shows letterbox only when it is landscape. When the iOS SDK demo app is changed to portrait, it shows letterbox only for 1-2 seconds and then automatically changes (bug) to PanAndScan.

When the left Android device is landscape, then the right iOS SDK demo app shows letterbox only when it is portrait. When the iOS SDK demo app is changed to landscape, it shows letterbox only for 1-2 seconds and then automatically changes (bug) to PanAndScan.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 20, 2019, 5:17pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/12 "2019-08-20T17:17:43Z")

</div>

Hi sgarg,

Thanks for the video and the information. I have passed this info to our engineering team for further investigation. I will get back to you asap.

Thanks!

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 22, 2019, 5:00am UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/13 "2019-08-22T05:00:48Z")

</div>

Hi sgarg,

Thanks for the information. The scenario you are describing seems like an unexpected behavior of the `MobileRTCActiveVideoView`, if you are using `MobileRTCVideoView` instead, the problem will not exist(The `MobileRTCVActiveVideoView` is a kind of `MobileRTCVideoView`, but it is doing more stuffs).

If you would like to show the video of a user in the larger view, you can show the video view of an attendee in the “Active view area” instead of calling the `pin video`(Pin a video will put that video into the ActiveVideoView).

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![sgarg](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@sgarg](https://devforum.zoom.us/u/sgarg)\
**Post date:** [August 22, 2019, 9:05am UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/14 "2019-08-22T09:05:25Z")

</div>

We are only using the demo code without any changes. You had made this same suggestion of using `MobileRTCVideoView` instead of `MobileRTCActiveVideoView` in your post above on July 18 also.

We already tried using this but couldn’t get it to work. Can you please share some sample code on how to make this change in demo app? We only want what the current demo app does where it shows the current active speaker in the big view and others in smaller views, but we want the letterbox view with black boxes so that full video is visible to user.

If you can fix this in SDK, we can wait till the next SDK release.

---

<div class="post-metadata">

**Author:** ![Murray\_Li](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murray_li/32/58_2.png) [@Murray\_Li](https://devforum.zoom.us/u/Murray_Li)\
**Post date:** [August 23, 2019, 10:22am UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/15 "2019-08-23T10:22:43Z")

</div>

Hi~  
MobileRTCActiveVideoView is a subclass of MobileRTCVideoView, and it’s going to do a lot more things, because there are other scenarios to consider, and we can’t change this behavior.

if you want to display the big view in MobileRTCVideoAspect\_LetterBox mode. You can in the large view also use MobileRTCVideoView to display video, click on the little video, with big view object - (BOOL) showAttendeeVideoWithUserID (userID NSUInteger); instead of - (BOOL)pinVideo:(BOOL)on withUser:(NSUInteger)userId;

In our sample, the big video use MobileRTCActiveVideoView , you click on the little video, will use “- (BOOL)pinVideo:(BOOL)on withUser:(NSUInteger)userId”, and then we will automatically replace MobileRTCActiveVideoView with the video of the userid you passed in. And there will be your previous problems.

When you use MobileRTCVideoView in large video, when you click the little video, use [videoView showAttendeeVideoWithUserID: userID]; There will be no problems for you.

I hope that helped  
Thanks

---

<div class="post-metadata">

**Author:** ![sgarg](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@sgarg](https://devforum.zoom.us/u/sgarg)\
**Post date:** [August 23, 2019, 11:48am UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/16 "2019-08-23T11:48:28Z")

</div>

I understand that MobileRTCActiveVideoView needs to do more than MobileRTCVideoView. We actually want all the extra features that MobileRTCActiveVideoView has.

For example, if we use your suggested solution above, will the big view automatically change to show the current participant who is speaking? Or will it only show the one pinned user even if someone else is speaking?

**Current behavior of MobileRTCActiveVideoView:**  
MobileRTCActiveVideoView always tries to use `MobileRTCVideoAspect_PanAndScan` if both devices in call are in same orientation. And MobileRTCActiveVideoView always tries to use `MobileRTCVideoAspect_LetterBox` if both devices in call are in different orientation.

**Why is this a problem: excessive cropping when zoom call view is made smaller.**  
This looks and feels GREAT when the call screen is taking the full screen on mobile device. In our application we sometimes need to show the call in a smaller view so that user can do other actions in app. We give top 25% of screen to zoom call, and display rest of our app UI in bottom 75% of screen. With current PanAndScan, it crops out a very large part of user’s face.

**Requested change**  
MobileRTCActiveVideoView can maintain the current behavior by default, but if `setVideoAspect` API is called to specify a MobileRTCVideoAspect\_, then it should use that value and skip its default logic.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 23, 2019, 11:15pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/17 "2019-08-23T23:15:34Z")

</div>

Hi sgarg,

Thanks for your detailed reply. Really appreciate it. I will pass your questions & requests to our engineering team and get back to you with updates asap.

Hope you have a wonderful weekend.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 28, 2019, 10:14pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/18 "2019-08-28T22:14:57Z")

</div>

Hi sgarg,

Thanks for the info again. Our SDK has dependencies on the Zoom client side, and this issue needs to be fixed on the client side. I have reported this issue to the client team and ask them to have a look at this. Since the client team has a lot of tasks and priorities, this will take some time.

In the meantime, I am afraid that the alternative solution that we offered above are the only way to deal with this scenario at this point. Pardon the inconvenience. I will let you know if I have any update on this.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 6:32pm UTC](https://devforum.zoom.us/t/video-resize-issue-on-ios/4926/19 "2020-08-21T18:32:54Z")

</div>

Closed on August 21, 2020, 6:32pm UTC


