Hello,
I’m trying to make a button to take a “screenshot” of a user-video tag, like if it was a basic video tag,
but I got some isssues. When I use getElementById on my user-video tag and use HTMLVideoElement before to do it, it seems to be recognized as an HTMLElement and not HTMLVideoElement so I can’t have access to the width or the height of my video for exemple.
Same when I want to call drawImage() function and put the user-video in argument of the function, the console told me :
“Failed to execute ‘drawImage’ on ‘CanvasRenderingContext2D’: The provided value is not of type ‘(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)’”
So my question is : How can I work with an user-video tag as if It was a basic video tag ?
How to solve that problem and perform a screenshot by calling the drawImage() function with the use of a user-video tag instead of video tag ?
Thanks you very much.