xaringanExtra
xaringanExtra copied to clipboard
Feature: circular webcam window
Hello @gadenbuie!
I think it'd be extra special to have the option for your webcam window to be a circle instead of a rectangle. Something about it looks really polished to me in some videos I've come across. I'm imagining a parameter in xaringanExtra::use_webcam()
like shape = "circle"
.
This is very low-priority on my end because I rarely make videos, but I happen to be making one this week and wondered if others might like to have the option in the future.
I actually need to make a recording of one of my presentations in the next couple weeks and wouldn't mind having this feature also. @gadenbuie Would you like me to make an attempt? I think it could work by simply placing the <video>
in a <div>
with some styling on the div for border-radius
and overflow: hidden
. Thoughts?
@mattwarkentin that's basically it, except that you'll have to do some extra work to make sure that the video element is centered in the wrapping div. We don't have complete control over the video image size; we can ask for video at 200px x 200px
but the browser/camera may give us video at a specific ratio that the camera supports. Feel free to take a pass at it!