Closed JonnyBurger closed 1 year ago
Capturing the pixels underneath is indeed what this API intends to do. Leaving black spots was never the intention, nor do I think it follows from the current phrasing (black pixels are not a valid sentinel value). See this text from the explainer:
The Element Capture document introduces a new mutation mechanism which we name "restriction". After a Web application "restricts" a video track to a given target-element, frames produced on that video track only consist information from the target-element and (and its descendants). Phrased differently, the track becomes a capture of the DOM sub-tree rooted at the target-element.
The spec itself doesn't explain things accurately enough - hence the TODO it has. :-)
Referring to this phrase:
So, let's say that a outside menu or dropdown is obscuring the target-element. Instead of removing those pixels (and leaving black spots), it would be nice if the browser could record the pixels underneath.
If so, we could maybe say something like:
I can't judge if this is practical or makes the implementation much harder, but I wanted to bring it up.