Camera upside down on old iPad Air

Description
The camera video is upside down on an old iPad Air (iPad4,2) running iOS 12.4.9
The issue is present only on this specific configuration, on other iPad devices running iOS 14 everything is working fine.

Which version?

iOS SDK version v5.2.42037.1112

Smartphone (please complete the following information):
iPad Air (iPad4,2) running iOS 12.4.9

Hey @criva,

Thanks for using the dev forum!

Are you using a custom meeting UI or the default meeting UI?

Thanks!
Michael

Hi

I am using custom meeting UI

Hey @criva,

Can you provide your code for showing the attendee video views?

Thanks!
Michael

I using the following class

//--------
class AttendeeVideoView : UIView {

public var userId: UInt? = nil

override init(frame: CGRect) {
  super.init(frame: frame)
  setupView()
}

lazy var videoView : MobileRTCVideoView = {
    let _videoView = MobileRTCVideoView.init(frame: self.bounds)
    if let userId = userId {
        _videoView.showAttendeeVideo(withUserID: userId)
        _videoView.setVideoAspect(MobileRTCVideoAspect_PanAndScan)
    }
    return _videoView
}()

private func setupView() {
    self.backgroundColor = UIColor.black
    self.addSubview(self.videoView)
}

func updateFrame() {
    self.videoView.frame = CGRect(x: 0, y: 0, width: self.bounds.size.width, height: self.bounds.size.height)
}

func showAttendeeVideo(userId: UInt) {
    if self.userId != nil && self.userId == userId {
        return;
    }
    self.userId = userId
    videoView.isHidden = false
    videoView.showAttendeeVideo(withUserID: userId)
    videoView.setVideoAspect(MobileRTCVideoAspect_PanAndScan)
}

func stopAttendeeVideo() {
    videoView.stopAttendeeVideo()
    videoView.isHidden = true
    userId = nil
}

}
//----------

Externally I call “showAttendeeVideo” passing the userId and “stopAttendeeVideo” for start and stop video. “updateFrame” is called when the AttendeeVideoView has been resized.