Streaming webcam from mediadevice to videoelement and painting to canvas doesnt work on chromium browsers

Issue

I am using a videoelement that i have created with
document.createlement('video') i have not appended it to the DOM, since i dont want it visible anywhere, i just need it so i can stream my webcam to it and then paint that to a , where i can apply filters, e.t.c live, so videoelement is detached from DOM.

This works in Firefox, but in Chromium browsers all i get is a black canvas.

I am expecting chromium browsers to be able to have a continued videostream that i can draw to my canvas, even if the videoelement is detached from DOM, if i do add the videoelement to DOM
document.body.appendChild(videoelementhere) it works and the canvas get the videofeed. only as long as videoelement is visible on view(e.g. if canvas is in top of page, and videoelement in bottom, and theres scroll content between so i cant see videoelement), if videoelement is not visible but is attached and the canvas element is, the video is paused and the canvas has whatever frame i drew last from the videoelement.