I think this question has been asked for many times. And some of them work either on Chrome or on Firefox.
I tried with the solution:
.rc{
width: 250px;
height: 250px;
border-radius: 100%;
-webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
-webkit-transform: rotate(0.000001deg);
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
}
add this to div class, and also change the height of video tag to
<div class="rc"><video id="localVideoStream" height="250" autoplay muted></video></div>
The video source is coming from webrtc, using getusermedia, and the video stream can be successfully shaped to circle and present on the webpage right now using the rc class.
The problem is each time, the video source will not be in the center of the circle shape, it stays a little left side. For example, when my face is in front of the camera, only a part of my face was on the right side of the circle shape. it is not in the center of the circle. Anyone knows how to solve this?
Thanks.