Mirror video tracks and virtual backgrounds properly

Hello!

I am currently experimenting with video-processor.js to implement virtual backgrounds. I am trying to ensure that participant video tracks and background images are mirrored correctly.

At the moment, local users are correctly shown a mirrored view of themselves, but when a virtual background is applied, the background is also mirrored, which is not the intended behavior. If I pre-mirror the background image to compensate, remote participants then see an incorrectly mirrored result.

How can I configure the video processing so that the local self-view is mirrored while the background and the video sent to other participants remain correctly oriented? I am using React.

I had a good discussion with @Marcus_Hellkvist on this topic. Short answer is it is by design.