用RecordRTC在浏览器端进行摄像头视频录制下载

首先需要安装chrome扩展,注意,这需要fanqiang,如果打不开,就查看这篇文章手动安装chrome扩展,点击查看
安装后扩展后,可以直接运行下面的代码,点击右上角在编辑器中运行
<style>
html, body {
margin: 0!important;
padding: 0!important;
text-align: center;
font-size: 1em;
}
video {
width: 30%;
border-radius: 5px;
border: 1px solid black;
}
</style>
<h1>用 RecordRTC进行摄像头视频录制下载</h1>
<p>
首先需要<a href="https://chrome.google.com/webstore/detail/getusermedia/nbnpcmljmiinldficickhdoaiblgkggc">安装chrome扩展</a>,注意,这需要fanqiang,如果打不开,就查看这篇文章手动安装chrome扩展,<a href="http://www.bfw.wiki//user10/15640228901296320096.html">点击查看</a>
</p>
<br>
<button id="btn-start-recording">开始录制</button>
<button id="btn-stop-recording" disabled>停止录制</button>
<hr>
<video controls autoplay playsinline></video>
<script src="http://repo.bfw.wiki/bfwrepo/js/RecordRTC.js"></script>
<script src="http://repo.bfw.wiki/bfwrepo/js/EBML.js"></script>
<!-- ../libs/DBML.js -->
<script>
var video = document.querySelector('video');
function captureStream(callback) {
navigator.mediaDevices.getUserMedia({
video: true, audio: true
}).then(function(stream) {
callback(stream);
}).catch(function(error) {
...点击查看剩余70%
网友评论0