Comments (6)
Thank you for your information, I'll consider it.
At the moment, I have a quick patch, so if anyone who needs a very simple use like me could try:
diff --git a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt
index 16d9aa5..4b48c31 100644
--- a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt
+++ b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt
@@ -305,7 +305,7 @@ class CameraSession(private val context: Context, private val callback: Callback
val video = VideoCapture.Builder(recorder).also { video ->
// Configure Video Output
- video.setMirrorMode(MirrorMode.MIRROR_MODE_ON_FRONT_ONLY)
+ // video.setMirrorMode(MirrorMode.MIRROR_MODE_ON_FRONT_ONLY)
if (configuration.videoStabilizationMode.isAtLeast(VideoStabilizationMode.STANDARD)) {
assertFormatRequirement("videoStabilizationMode", format, InvalidVideoStabilizationMode(configuration.videoStabilizationMode)) {
it.videoStabilizationModes.contains(configuration.videoStabilizationMode)
diff --git a/node_modules/react-native-vision-camera/ios/Core/CameraSession+Configuration.swift b/node_modules/react-native-vision-camera/ios/Core/CameraSession+Configuration.swift
index 882f4b3..9897d69 100644
--- a/node_modules/react-native-vision-camera/ios/Core/CameraSession+Configuration.swift
+++ b/node_modules/react-native-vision-camera/ios/Core/CameraSession+Configuration.swift
@@ -158,7 +158,7 @@ extension CameraSession {
func configureOrientation(configuration: CameraConfiguration) {
// Set up orientation and mirroring for all outputs.
// Note: Photos are only rotated through EXIF tags, and Preview through view transforms
- let isMirrored = videoDeviceInput?.device.position == .front
+ let isMirrored = false
for output in captureSession.outputs {
if isMirrored {
output.mirror()
from react-native-vision-camera.
Mirroring is intentional. This is how VisionCamera works.
For Video files it just isn't really simple - what if you flip camera devices from front to back while recording? Is the video now mirrored or not?
from react-native-vision-camera.
Mirroring is intentional. This is how VisionCamera works.
For Video files it just isn't really simple - what if you flip camera devices from front to back while recording? Is the video now mirrored or not?
The back camera does not mirror the video, only the front-facing camera does. Typically on stock camera app (on my iphone), the camera preview appears mirrored, but when saving to a file, it is flipped back.
While I can manually flip the video, there is no indicator to determine if the video is mirrored, unlike PhotoFile which has an 'isMirrored' field.
from react-native-vision-camera.
That's not what I said.
A video file cannot have an isMirrored
flag because you could switch from back <-> front while recording. One stream is mirrored, one isn't.
from react-native-vision-camera.
That's not what I said.
A video file cannot have an
isMirrored
flag because you could switch from back <-> front while recording. One stream is mirrored, one isn't.
So what could you suggest? My usecase is quite simple, only need front camera.
from react-native-vision-camera.
I think I could add a prop like isMirrored
that controls mirroring for photos and videos. But this is a bit complex due to orientation, and I don't have the time to add that right now. If you want to sponsor this, I could add it. DM me for details.
from react-native-vision-camera.
Related Issues (20)
- 💭 Add filter to photo when photo is taken HOT 2
- 💭 Obtaining camera calibration data HOT 5
- 🐛 Crash in Android release build HOT 5
- 🐛 Failed to convert NativeBuffer to SkImage HOT 2
- 🔧 RCT_NEW_ARCH_ENABLED=1 failed pod install HOT 2
- 🐛 Cannot debug via Google Chrome if using Android Native method marked as synchronous HOT 2
- 🐛 Crash in iOS release build when using SkiaFrameProcessor HOT 3
- 🐛 Cached apps freezer is freezing app on Google Pixel with Android 14 HOT 6
- 🐛 App Crashes when try to implement camera inside modal. HOT 1
- 💭 iOS photo quality vs native camera HOT 4
- 🐛 RN 0.74, RNVC 4.3.2. Take a photo or snapshot on iOS, the file does not exist at the path indicated by the response HOT 10
- 💭 Getting incorrect coordinates and bounds when using CodeScanner when scanning barcodes HOT 1
- 🔧 Failed to archive HOT 3
- 🐛 Landscape mode camera issue. HOT 1
- 🐛 Landscape mode camera issue HOT 3
- 🐛 Unable to record video more than 30 fps HOT 3
- 🐛 outputOrientation not working in android but working properly in iOS. HOT 3
- 💭 Is it possible to decrease the video resolution on v4? HOT 3
- 🐛 Preview orientation is wrong on some tablets HOT 3
- 🐛 Unable to set minimum zoom on first render HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.