I'm looking to overlay a video with a blue transparent mask with a cut out circle in the middle. The cut out circle would be colored red and be transparent as well.
I need to be able to resize the circle (and the cut out) easily with javascript.
It would end up looking something like this:
https://i.stack.imgur.com/ORVyQ.jpg
I can't use a transparent PNG or SVG and simply resize it because I need to be able to set the colors with javascript.
What would be the most efficient way of doing this?
Here's what I have at the moment, but I don't think it's the best way.
https://jsfiddle.net/tbristol/j60u8pLm/
In particular, because I'm using a second SVG element and adjusting it with the top:-18px, I don't think it'll scale well or resize well.
svg:nth-child(2) {
margin-top:-100%;
position:relative;
top:-18px;
}