NextLevel icon indicating copy to clipboard operation
NextLevel copied to clipboard

Orientation issue

Open dhvl1729 opened this issue 5 years ago • 2 comments

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

dhvl1729 avatar Jul 14 '21 17:07 dhvl1729

nextLevel.previewLayer.connection!.videoOrientation = .portrait you should add this in the delegate methods as you like

saarazari5 avatar Jul 27 '21 11:07 saarazari5

@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.

MerinoA avatar Jun 01 '22 17:06 MerinoA