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

[Feature Request] Camera::mirrored #3100

Open
itlancer opened this issue Mar 4, 2024 · 4 comments
Open

[Feature Request] Camera::mirrored #3100

itlancer opened this issue Mar 4, 2024 · 4 comments
Labels

Comments

@itlancer
Copy link

itlancer commented Mar 4, 2024

Feature Description

AIR should have a way to know is camera provide mirrored image (video output) or not.
For video chats, photo booths and many other AR/VR applications important to know is camera provide mirrored image or not.
For example, all frontal cameras with iOS devices provide mirrored image by default. But it could varies with different cameras (embedded or external USB) for macOS/tvOS/Windows. Right now there is no way to detect it.

It could be implemented as Boolean getter Camera::mirrored or some String property which provide one of constant (UNMIRRORED, MIRRORED, UNKNOWN).

https://developer.apple.com/documentation/avfoundation/avcaptureconnection/1389172-videomirrored?language=objc
https://learn.microsoft.com/en-us/uwp/api/windows.media.capture.mediacapture.getpreviewmirroring?view=winrt-22621

Related issues:
#1344
#1348
#305

Known Workarounds

Write your own native extension to work with cameras.

@henke37
Copy link

henke37 commented Mar 9, 2024

This property belongs on the Video object. Which already lets you flip the image if you want to.

@itlancer
Copy link
Author

@henke37
Thanks for suggestion. But in this feature request I want to know "does camera provide mirrored output?". Not "how to make horizontal flip of video output?".

@henke37
Copy link

henke37 commented Mar 11, 2024

My point is that you are misunderstanding the situation. The camera isn't the one who is flipping the image.

@itlancer
Copy link
Author

For iOS/macOS/tvOS I agree with you (according to Apple Objective-C/Swift APIs). For Windows it something different it belongs to MediaCapture. That's why I suggest Camera::mirrored. But it could be anything else (Video::mirrored or some other new class). I just want to detect does camera mirror the output.

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

No branches or pull requests

2 participants