Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orientation issue #256

Open
dhvl1729 opened this issue Jul 14, 2021 · 2 comments
Open

Orientation issue #256

dhvl1729 opened this issue Jul 14, 2021 · 2 comments

Comments

@dhvl1729
Copy link

dhvl1729 commented Jul 14, 2021

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
@saarazari5
Copy link

saarazari5 commented Jul 27, 2021

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

@MerinoA
Copy link

MerinoA commented Jun 1, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants