You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
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
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: