Priyanka Jethwa
Priyanka Jethwa

Reputation: 77

OpenTok - cycling camera/ switch camera to front/back on mobile device in video call

I have a problem with switching between front and back camera when streaming with OpenTok (Web version but in mobile browser). can any one help me out for this?

I was trying to switch camera using below code line. but it doesn't work.

publisher.cycleVideo();

Upvotes: 1

Views: 1163

Answers (1)

Adam Ullman
Adam Ullman

Reputation: 1537

My guess is that you are using a version of chrome that is too old to support replaceTrack. The cycleVideo method returns a promise, you should handle it and see if you get an error message. That will give you more details.

publisher.cycleVideo().catch(console.error);

Upvotes: 2

Related Questions