I am using this source code https://www.webrtc-experiment.com/RecordRTC/simple-demos/screen-recording.html
to screen recording, it is working fine and after clicking stop