国内这方面的资料真少的可怜,翻出去一搜一大把,推荐一个github的插件库,非常强大,支持各种各样的录制方式.

下载完成之后,引用对应的js立即可以使用.

html5 录制/保存视频/录音
<script src="RecordRTC/RecordRTC.js"></script>
<script src="part-of-screen-sharing/screenshot.js"></script>
<div >
<input></input>

</div>
<button onclick="start()">start</button>
<button onclick="stop()">stop</button>

<script>
var elementToShare = document.getElementById('elementToShare');
var recorder = RecordRTC(elementToShare, {
    type: 'canvas'
});
function start(){
    recorder.startRecording();
}

function stop(){
    recorder.stopRecording(function(url) {
    window.open(url);
});
}

</script>

 

相关文章:

  • 2021-08-11
  • 2021-11-30
  • 2022-12-23
  • 2021-11-30
  • 2021-11-28
  • 2021-06-12
  • 2021-07-22
  • 2021-05-28
猜你喜欢
  • 2021-06-25
  • 2022-12-23
  • 2021-09-27
  • 2021-12-23
  • 2022-01-08
  • 2021-12-24
相关资源
相似解决方案