3.0.0-beta.10 • Published 4 years ago

luxiang121 v3.0.0-beta.10

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

使用说明

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

参数参数类型参数描述
wrapElementobject外层div元素(必填)
classobject上传框样式class(选填)
typestring{ type: file... }
acceptstring{ accept: video/ / image/ }
方法参数描述
Recordernew Recorder({})
callbackcallback()