luxiang121
v3.0.0-beta.10
Published
js中: ``` <div id="videoWrap"></div> <script> const videoWrap = document.getElementById('videoWrap');
Downloads
4
Readme
使用说明
js中:
<div id="videoWrap"></div>
<script>
const videoWrap = document.getElementById('videoWrap');
const video = new Recorder({
wrapElement: videoWrap,
class: 'aaa'
}, (res) => {
console.log(res);
const video = document.createElement('video');
video.src = res.url;
video.autoplay = 'autoplay';
video.controls = 'controls';
videoWrap.appendChild(video);
});
</script>
vue/angular/react
参数 | 参数类型 | 参数描述
---|---|---|---
wrapElement | object | 外层div元素(必填)
class | object | 上传框样式class(选填)
type | string | { type: file... }
accept | string | { accept: video/* / image/* } |
方法 | 参数描述 ---|--- Recorder | new Recorder({}) callback | callback()