Myself(Preview) video is not showing on MobileRTCActiveVideoView and rotation issue


Hi Guys,
I am new to Zoom SDK. I wanted to implement customMeetingUI with my application.I did everything but two problems occur.

  1. My small size video is not showing on MobileRTCActiveVideoView. Actually when you see the all zoom app. there will be a two video on the screen. one is opposite joined user video and another one is user own video. I can able to see opposite user video. But I could not see my small size video on my screen. Please help me!

  2. Second bug is rotation. if i run the app in landscape the Active video view is coming in landscape perfectly or if I run the app in portrait it is coming perfectly in portrait mode. but if I rotate landscape to portrait or portrait to landscape the video view will be either landscape or portrait. Please help me to fix this error.

Which version?

To Reproduce(If applicable)

  • (void)onMobileRTCAuthReturn:(MobileRTCAuthError)returnValue {
    NSLog(@“onMobileRTCAuthReturn %d”, returnValue);

    if (returnValue != MobileRTCAuthError_Success)
    NSString *message = [NSString stringWithFormat:NSLocalizedString(@“SDK authentication failed, error code: %zd”, @""), returnValue];
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:message delegate:self cancelButtonTitle:NSLocalizedString(@“OK”, @"") otherButtonTitles:NSLocalizedString(@“Retry”, @""), nil];
    [alert show];

    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];

    MobileRTCPreviewVideoView *preview = [[MobileRTCPreviewVideoView alloc] initWithFrame:CGRectMake(0, 0, 150, 200)];
    [self.previewVideo setVideoAspect:MobileRTCVideoAspect_PanAndScan];

    [[MobileRTC sharedRTC] getMeetingSettings].enableCustomMeeting = YES;
    [[MobileRTC sharedRTC] getMeetingService].customizedUImeetingDelegate = self;
    MobileRTCMeetingService *ms = [[MobileRTC sharedRTC] getMeetingService];

    if (ms)
    #if 0
    //customize meeting title
    [ms customizeMeetingTitle:@“Sample Meeting Title”];

    ms.delegate = self;

    MobileRTCMeetingJoinParam * param = [[MobileRTCMeetingJoinParam alloc] init];

    param.meetingNumber = @“74058707293”;
    param.password = @“kkEC3x”;
    param.userName = @“Ram”;

    param.participantID = @“462264”;

    MobileRTCMeetError ret = [ms joinMeetingWithJoinParam:param]



Smartphone (please complete the following information):

  • Device: iPhone 6s Plus
  • OS: 13.1.2

Hey @itramkumar.78

Thanks for using the dev forum, and thank you for the detailed post!

So first, I would move your view code to some place after the meeting has started.
MobileRTCPreviewVideoView is used to render the video of yourself (the little video on the normal Zoom app). And MobileRTCActiveVideoView is used to render the main video stream. In this case, the other user in the meeting. So to have both of these videos you need to have 2 separate views. I would also remove disableShowVideoPreviewWhenJoinMeeting:NO until you get this working.

As for rotation, the video streams should rotate themselves, but in a custom meeting UI you will have to rotate the views yourself.

Let me know if that helps!

I added separate view for Active video view and Preview video view. The preview video is stopped when the active video is rendering. Why? how can i resume the preview video?

  • (void)onInitMeetingView {

      videoView = [[MobileRTCActiveVideoView alloc] initWithFrame: CGRectMake(0, 67, 200, 200)];
      [videoView setVideoAspect:MobileRTCVideoAspect_PanAndScan];
      [self.view addSubview:self.videoView];
      self.previewVideo = [[MobileRTCPreviewVideoView alloc] initWithFrame:CGRectMake(100, 200, 200, 200)];
      [self.previewVideo setVideoAspect:MobileRTCVideoAspect_PanAndScan];
      [self.view addSubview:self.previewVideo];


Hey @itramkumar.78,

The preview view is intended to be used in the waiting room similar to how the Zoom client app behaves. To get the view to persist throughout the app you can use a MobileRTCVideoView instead, and call

MobileRTCMeetingService *ms = [[MobileRTC sharedRTC] getMeetingService];
NSUInteger myId = [[[MobileRTC sharedRTC] getMeetingService] myselfUserID];
[videoView showAttendeeVideoWithUserID:userID];


Hi Michael_Condon,
Thanks for your reply. I fixed the issue with your guidance. But I want to give more clear description about how I fixed this issue.I will be very useful to other guys.

  1. To show both Active video view and Preview Video view in Customize UI Meeting, We need to use MobileRTCVideoView.

  2. Developer should create separate instance for Active video view and Preview Video view then add both video view to MobileRTCVideoView instance.

Code Sample:

  MobileRTCVideoView  *videoTotalView = [[MobileRTCVideoView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];

 //Active Video
  MobileRTCActiveVideoView  *videoView = [[MobileRTCActiveVideoView alloc] initWithFrame: CGRectMake(0, 0,self.view.frame.size.width, self.view.frame.size.height)];

    [videoView setVideoAspect:MobileRTCVideoAspect_PanAndScan];
  //Preview Video
    CGFloat previewX = (self.view.frame.size.width - 100);
    CGFloat previewY = (self.view.frame.size.height - 100);
   MobileRTCPreviewVideoView  *previewVideo = [[MobileRTCPreviewVideoView alloc] initWithFrame:CGRectMake(previewX, previewY, 100, 100)];
    [previewVideo setVideoAspect:MobileRTCVideoAspect_PanAndScan];

    [videoTotalView addSubview:videoView];
    [videoTotalView addSubview:previewVideo];
    [self.view addSubview:videoTotalView];

-----------------------------------------------------That’s All-----------------------------------------------------

Once Again Thanks a lot for your guidance!!!

1 Like

Hey @itramkumar.78

Thank you for providing this! Im glad is it working now :slight_smile:

Let us know if you have any other questions.