mozmorris/react-webcam

[Feature Request] Show video mirrored but take a non-mirrored screenshot

frankgalindo opened this issue · 7 comments

Hi guys, I was working on a project using react-webcam and at some point I needed to show the video mirrored, but take a non-mirrored screenshot. I managed to implement this in my project, but I think that could be a built-in option into the library itself.

I have never contributed to an open source project before, but I would like to implement this feature. Is that OK?

@frankgalindo would like to know how you did this. Did you draw the image on a canvas and transformed the scaleX value to get non-mirrored screenshot ?

Hi @SanthoshRaju91, I did it just like @mozmorris `s example.

@mozmorris Yes, I implemented it in my project just like u did in the example. I would like to add this as a feature in the library,

@frankgalindo thank you for raising this. As it's a case of adding a single line of css, I think it would make sense to add this to the README instead.

video {
  transform: scaleX(-1);
}

So, should it be an example like "Show all cameras by device Id" and "Recording a stream"?

@frankgalindo that would be excellent.

@mozmorris I just submitted a PR

#355