Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: circular webcam window #101

Open
spcanelon opened this issue Mar 19, 2021 · 2 comments
Open

Feature: circular webcam window #101

spcanelon opened this issue Mar 19, 2021 · 2 comments

Comments

@spcanelon
Copy link

spcanelon commented Mar 19, 2021

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.

@mattwarkentin
Copy link
Contributor

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?

@gadenbuie
Copy link
Owner

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants