How can I get threejs' webcam feed into a WebGL texSubImage2D?

I’d like to know how can I transmit threejs’ webcam feed into a texSubImage2D or texImage2D. The same way this link shows how I can bind a video to a WebGL texture, I’d like to know how I can bind threejs’ webcam feed to a WebGL texture.

Thank you for your time!

The following example should demonstrate what you are looking for: three.js webgl - materials - video - webcam