Removing 2-sec latency whilst invoking "stopRecording"

Ref: https://www.webrtc-experiment.com/RecordRTC/#comment-1624224905

You also need to remove "src" attribute from <audio> tag:

btnStopRecording.onclick = function() {
audioTag.src = null;
recordRTC.stopRecording(onEncodingFinished);
};