Kimberley C
Kimberley C

Reputation: 11

Flipping between Front and Back Camera on a Video Call

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

Answers (2)

ccvlad
ccvlad

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

Yuliia Khomenko
Yuliia Khomenko

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

Related Questions