Skip to content

set Camera lanscape #2034

@thegobot

Description

@thegobot

Is it possible to set the camera to landscape mode when the screen is in portrait orientation?

#407

Currently, to shoot wide videos, I have to rotate the phone. I need 720x480 in portrait mode (so there are no black bars on the sides). I've tried everything, but the preview keeps stretching.

val stream = GenericStream(baseContext, this, CameraXSource(), NoAudioSource()).apply {
    getGlInterface().autoHandleOrientation = false
    getGlInterface().setIsPortrait(false)
    getGlInterface().setCameraOrientation(0)
}

stream.prepareVideo(
        width = 720,
        height = 480,
        rotation = 0,
)

stream.startPreview()

``

What else needs to be done to get the camera in 720x480 resolution in portrait mode?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions