NextLevel
NextLevel copied to clipboard
Orientation issue
If video is in landscape and in between change mode to portrait the video is zoomed . Like its not smoooth
NextLevel.shared.delegate = self
NextLevel.shared.deviceDelegate = self
NextLevel.shared.videoDelegate = self
NextLevel.shared.captureMode = .video
NextLevel.shared.deviceOrientation = .portrait
NextLevel.shared.automaticallyUpdatesDeviceOrientation = true
NextLevel.shared.flipCaptureDevicePosition()
NextLevel.shared.audioConfiguration.bitRate = 44000
NextLevel.shared.devicePosition = .back
nextLevel.previewLayer.connection!.videoOrientation = .portrait you should add this in the delegate methods as you like
@saarazari5 is correct. I ran into this issue as well.
func nextLevelSessionWillStart(_ nextLevel: NextLevel) {
nextLevel.previewLayer.connection?.videoOrientation = .portrait'
}
This corrected the issue and avoided any hacks trying to manipulate the device orientation.