function recordCanvasUsingRecordRTC(canvas) {
  var recorder = RecordRTC(canvas, {
      type: 'canvas',
      showMousePointer: true
  });

  recorder.startRecording();

  setTimeout(function() {
      recorder.stopRecording(function(url) {
          var blob = recorder.getBlob();
          console.log('blob', blob);

          var video = document.createElement('video');
          video.src = URL.createObjectURL(blob);
          video.setAttribute('style', 'height: 100%; position: absolute; top:0;');
          var body = document.querySelector('body');
          body.innerHTML = '';
          body.appendChild(video);
          video.controls = true;
          video.play();
      });
  }, 10 * 1000);
}
function recordCanvasUsingRecordRTC(canvas) {
  var recorder = RecordRTC(canvas, {
      type: 'canvas',
      showMousePointer: true
  });

  recorder.startRecording();

  setTimeout(function() {
      recorder.stopRecording(function(url) {
          var blob = recorder.getBlob();
          console.log('blob', blob);

          var video = document.createElement('video');
          video.src = URL.createObjectURL(blob);
          video.setAttribute('style', 'height: 100%; position: absolute; top:0;');
          var body = document.querySelector('body');
          body.innerHTML = '';
          body.appendChild(video);
          video.controls = true;
          video.play();
      });
  }, 10 * 1000);
}
function recordCanvasUsingRecordRTC ( canvas ) { var recorder = RecordRTC ( canvas , { type : 'canvas' , showMousePointer : true } ) ; recorder . startRecording ( ) ; setTimeout ( function ( ) { recorder . stopRecording ( function ( url ) { var blob = recorder . getBlob ( ) ; console . log ( 'blob' , blob ) ; var video = document . createElement ( 'video' ) ; video . src = URL . createObjectURL ( blob ) ; video . setAttribute ( 'style' , 'height: 100%; position: absolute; top:0;' ) ; var body = document . querySelector ( 'body' ) ; body . innerHTML = '' ; body . appendChild ( video ) ; video . controls = true ; video . play ( ) ; } ) ; } , 10 * 1000 ) ; }
RecordRTC =========
RecordRTC =========
record canvas using RecordRTC