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

Android only: "Position: front" turns the recorded video upside down #141

Open
nina-viter-mp opened this issue Nov 21, 2024 · 0 comments
Open

Comments

@nina-viter-mp
Copy link

Dear cap-go team! Please check this issue.

Android version 13

"@capacitor/app": "^6.0.0"
"@capgo/camera-preview": "^6.3.35"

"Position: front" doesn't work on android. Camera Preview shows rear camera and when video is recorded it's turned upside down. it works as expected on IOS.

the code example:

await CameraPreview.start({
toBack: false,
position: 'front',
width: window.screen.width - 40,
height: window.screen.height,
y: Capacitor.getPlatform() === 'android' ? 110 : 250,
x: Capacitor.getPlatform() === 'android' ? 20 : 30,
paddingBottom: Capacitor.getPlatform() === 'android' ? 310 : 300,
})

const recordVideo = async () => {
if (!Capacitor.isNativePlatform()) return
if (isVideoRecording.value) {
const result = await CameraPreview.stopRecordVideo()
} else {
const cameraPreviewOptions: CameraPreviewOptions = {}
await CameraPreview.startRecordVideo(cameraPreviewOptions)
isVideoRecording.value = true
}
}

record
recorded video

Expected results:
position: front works as expected. video is not turned upside down.

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

1 participant