'Is it possible to obtain a MediaStream from a video-js tag element?

Is it possible to obtain a MediaStream or atleast a VideoFrame from a video-js tag element just like we would obtain from html video tags via captureStream() method?

My objective is to send the stream via a WebRTC PeerConnection.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source