video-quickstart-ios: [iOS 12.1, iPhone XS/XS Max/XR] TVIVideoView displays video with incorrect rotation

Iam having some trouble with the twilio video previewView functions. the view renders the local video frames from the front camera at viewdidload like normal but in ios 12.1 the view rotates 45 degrees if you set it to shouldmirror. But if you dont flip the view so that it mirrors then it is working and is not automatically rotating 45 degrees and everything becomes turned around so that left is right and right is left… its really weird but this happend just when i updated my phone and then i tryed it on my other phone that has ios 12.0 and there it works fine.

Steps to Reproduce

  1. I have tryed to rotate the view back 45 degrees. [no success]

2.I have tryed to not flip the camera and just let it be. but then the preview is really ugly when it is not mirrored [some success]

  1. tryed it on a older ios update. [Success]

Code

// The Code is the normal code to flip the camera in the delegate like this 
extension ViewController : TVICameraCapturerDelegate {
    func cameraCapturer(_ capturer: TVICameraCapturer, didStartWith source: TVICameraCaptureSource) {
        self.previewView.shouldMirror =  (source == .frontCamera)
    }
}

Expected Behavior

I expected the local previewView to not rotate 45 degrees and show a normal preview like it allways have done

Actual Behavior

The preview view rotates 45 degrees if previewView.shouldMirror = true. If it is set to false it will work but look really ugly so the behavior is not correct at all. the code above is just like setting shouldMirror to true

Reproduces How Often

Allways on Iphone xs max iOS 12.1

Logs

// There is no log error everything is normal with the code...

Video iOS SDK

TwilioVideo iOS SDK Version 2.5

Xcode

Xcode Version 10.1 (10B61)

iOS Version

iOS 12.0 [Success] iOS 12.1 (New update) [no success]

iOS Device

Tested on an IPhone XS Max and on a IPhone 7

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 25 (14 by maintainers)

Most upvoted comments

Thanks for the quick and thorough updates on the issue @piyushtank @ceaglest, much appreciated.

Hi @JiyarMahmod and @lukaspili,

We have just released 2.5.5 with the Metal rendering bug fix. Please give it a try in your applications.

Thanks, Chris