Reputation: 77
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
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