-
-
Notifications
You must be signed in to change notification settings - Fork 340
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
MediaDeviceInfo: How to detect and set orientation of a camera? #155
Comments
derwaldgeist
changed the title
MediaDeviceInfo: Property "facing" is always empty
MediaDeviceInfo: How to detect orientation of a camera?
Apr 11, 2016
derwaldgeist
changed the title
MediaDeviceInfo: How to detect orientation of a camera?
MediaDeviceInfo: How to detect and set orientation of a camera?
Apr 11, 2016
Closing this to post it as a question in the Google Groups instead. |
Reopened because @ibc asked me to open an issue for this :-) |
Related #440 |
merged #446 on master will test master then release 6.0.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The MediaDeviceInfo result object contains a property called facing, but this is fixed to '':
https://github.com/eface2face/cordova-plugin-iosrtc/blob/master/dist/cordova-plugin-iosrtc.js#L81
This property would be quite useful to detect which camera is facing to the user, and in fact the Swift code detects this:
https://github.com/eface2face/cordova-plugin-iosrtc/blob/master/src/PluginEnumerateDevices.swift#L25
So I wondered why this isn't passed to the JS code. As I can see in the docs, the facing state is marked as deprecated, and in the specs the MediaDeviceInfo dictionary does not specifiy such a facing property:
http://w3c.github.io/mediacapture-main/#idl-def-MediaDeviceInfo
Yet, this raises the question what would be the standard-compliant way of detecting the orientation of a camera? In the specs, I could only find a way to set the facing mode constraints for a media track:
http://w3c.github.io/mediacapture-main/#idl-def-MediaTrackSupportedConstraints
I am also wondering if there is a way to switch the camera after a connection has been established? As far as I understand the docs, the device can only be specified in getUserMedia(), which AFAIK has to be called before a connection is set-up. Would I have to close the connection and re-establish it in this case?
Thanks in advance for your insights on this :-)
The text was updated successfully, but these errors were encountered: