Record your screen or camera and save the video locally.
MediaRecorder API and getDisplayMedia to capture your screen and audio directly in the browser. Once you stop the recording, you can download the video to your computer.
getUserMedia along with getDisplayMedia.