Reputation: 11
I'm using the Cordova SDK to implement a video calling app. Is there a way to allow the user to flip between the front and back camera?
I've used the ConnectyCube.videochat.getMediaDevices() function to access the available media stream tracks, but only the front camera which is being used in the local stream is in the list. How do I get the back camera media stream track?
Upvotes: 1
Views: 43
Reputation: 21
Please, here is the docs: https://developers.connectycube.com/cordova/videocalling/#switch-video-cameras
You can also immediately connect with the back camera if you put the relevant parameters to session.getUserMedia({audio: {...}, video: {facingMode: { exact: "environment" }}})
. Check here: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#examples
Upvotes: 0
Reputation: 21
ConnectyCube has such function described in their documentation https://developers.connectycube.com/cordova/videocalling/#switch-video-cameras. Is this is something you are looking for?
Upvotes: 1