gsdutils
0.0.1 • Public • Published
npm install gsdutils --save
//main.js
import { createApp } from 'vue'
import App from './App.vue'
import gsdUtils from 'gsdutils'
let app = createApp(App)
app.use(gsdUtils)
app.mount('#app')
//index.vue
var demo = new this.$gsdUtils.screenshot('videoId','canvasId',false) // 第一个参数video标签的id,第二个参数canvas标签的id,第三个参数是结束录像时浏览器是否会下载录制的视频
let imageBolb = this.cs.downloadImg(true) //生成当前的截图 true为浏览器会下载截图,false为不会。默认为true
console.log(imageBolb,'imageBolb') // 截图的base64
demo.startCapture() //开始录制
demo.stopCapture().then(res=>{ //结束录制 返回视频的bolb数据
console.log(res,'res')
})
Package Sidebar
Install
Weekly Downloads