Skip to content

Getting notified when switching camera #68

@LinusU

Description

@LinusU

I'm trying to have my local video stream mirrored when using the front-facing camera, but not mirrored when using the back camera.

My current code looks something like this:

_localStream.getVideoTracks()[0].switchCamera();
_renderer.mirror = !_renderer.mirror;

The problem is that switchCamera takes ~1s, but setting the mirror property is instant. It thus creates a bit of an awkward UI experience...

Is it possible to get a callback when the camera is actually switched, so that I can time setting mirror at the exact same time?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions