Not able to see myself using MobileRTCVideoView in custom UI

Description
Hi Team,

I am not able to see myself in small mini view. I am using MobileRTCVideoView for this however it is not working, all I can see is default user thumbnail image instead of myself. Though I can see host.

Which iOS Meeting SDK version?
v5.7.1.644

Steps to reproduce the behavior:
I am just launching the custom screen after entering the meeting id

Code: showAttendeeVideoSuccessful is returning TRUE

@IBOutlet private weak var zoomCustomVideoView: UIView!

@IBOutlet private weak var zoomCustomMiniVideoView: UIView!

func loadUserVideo() {

    if let localUserID = MobileRTC.shared().getMeetingService()?.myselfUserID() {
        let hostVideoView = MobileRTCActiveVideoView(frame: zoomCustomVideoView.bounds)
        hostVideoView.setVideoAspect(MobileRTCVideoAspect_PanAndScan)
        zoomCustomVideoView.addSubview(hostVideoView)
        
        let attendeeVideoView = MobileRTCVideoView(frame: zoomCustomMiniVideoView.bounds)
        attendeeVideoView.setVideoAspect(MobileRTCVideoAspect_LetterBox)
        let showAttendeeVideoSuccessful = attendeeVideoView.showAttendeeVideo(withUserID: localUserID)
        if showAttendeeVideoSuccessful {
            print("Started showing local user video.")
        } else {
            print("Failed to show local user video.")
        }
        zoomCustomMiniVideoView.addSubview(attendeeVideoView)
    }
}

extension ViewController: MobileRTCMeetingServiceDelegate {

func onMeetingReady() {
    customZoomUIViewController?.loadUserVideo()
}

}

Hey @Prabhjot,

Thanks for using the dev forum!

Are you using a simulator? The simulator does not have a camera stream. If you are using a real device, have you started the video?

Thanks!
Michael

Hi @Michael_Condon

Thanks for reverting back

I am running the app on device and it does not ask me for camera permission at first, though I added the camera usage description in plist file. So, I forced ask for camera permission on videoDidLoad this way:

AVCaptureDevice.requestAccess(for: AVMediaType.video) { response in
if response {
//access granted
} else {
}
}

After this app asked for a camera permission and I gave it. But still after giving camera permission I am not able to see participant video.

Do I need to do anything else or is there are method to start a video ?

Hi @Michael_Condon

Finally I am able to get participant video. Thanks for the help.

I somehow manage to figure that I forget to add viewModel.meetingService?.muteMyVideo(false) in the code. After adding it, app worked fine.

I have few questions.

  1. Does zoom still have two different SDKs for appstore and dev testing ? If yes could you pls share the links of both the SDKs.
  2. If host video is muted then I can see default user thumbnail image (like the user thumbnail icon in the screenshot attached above). How can we hide that ? I am using MobileRTCActiveVideoView to show host video
1 Like

Hey @Prabhjot,

Awesome! I am glad you got it working :slight_smile:

  1. No, Zoom only provides one unified framework now.
  2. You cannot change that thumbnail, however, you can check if their video is muted and if it is, you can hide the view.

Thanks!
Michael

Thank you very much @Michael_Condon for prompt responses and clarifying my doubts.

I have one more question:

As I am using custom UI, can we get the video orientation when we launch our custom UI. i.e If the host video is in landscape I should be able to present custom UI view in landscape else in portrait. Can we achieve this ?

Hey @Prabhjot,

I do not think you can check the orientation of the other device’s video stream unfortunately.

Thanks!
Michael

okay. Thank you very much for your time @Michael_Condon . I think this should be added in zoom SDK in future releases. Anyhow, thanks again.

Hey @Prabhjot,

You are welcome :slight_smile: I will let the team know.

Thanks!
Michael

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