Commit e3652966 by Tianqing Liu

feat: 抓拍功能

1 parent e4166061
...@@ -129,6 +129,10 @@ export default { ...@@ -129,6 +129,10 @@ export default {
}); });
} }
}, },
screenshot(filename = '', format = 'png', quality = 0.92, type = 'base64') {
return this._jessibuca.screenshot(filename, format, quality, type);
},
}, },
} }
</script> </script>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<button @click="handlePause">暂停</button> <button @click="handlePause">暂停</button>
<button @click="handleStop">停止</button> <button @click="handleStop">停止</button>
<button @click="handleDestroy">销毁</button> <button @click="handleDestroy">销毁</button>
<!-- <button @click="handleScreenshot">抓拍</button> --> <button @click="handleScreenshot">抓拍</button>
</div> </div>
</div> </div>
</template> </template>
...@@ -57,9 +57,8 @@ export default { ...@@ -57,9 +57,8 @@ export default {
]; ];
}, },
handleScreenshot() { handleScreenshot() {
this.$refs.vionPlayer.screenshotWatermark().then(data => { const result = this.$refs.vionPlayer.screenshot();
console.log('handleScreenshot', data); console.log('handleScreenshot', result);
});
}, },
handlePause() { handlePause() {
this.$refs.vionPlayer.pause(); this.$refs.vionPlayer.pause();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!