Commit 338adf45 by Tianqing Liu

feat: 增加水印功能

1 parent 7d582e03
...@@ -63,9 +63,8 @@ export default { ...@@ -63,9 +63,8 @@ export default {
controlAutoHide: this.controlAutoHide, controlAutoHide: this.controlAutoHide,
supportDblclickFullscreen: false, supportDblclickFullscreen: false,
showBandwidth: false, // 显示网速 showBandwidth: false, // 显示网速
// TODO: 水印功能暂不可用
fullscreenWatermarkConfig: { fullscreenWatermarkConfig: {
text: '文安智能', text: this.watermarkText || '',
}, },
/* watermarkConfig: { /* watermarkConfig: {
image: { image: {
...@@ -197,6 +196,9 @@ export default { ...@@ -197,6 +196,9 @@ export default {
image.src = this._jessibuca.screenshot(filename, format, quality, type); image.src = this._jessibuca.screenshot(filename, format, quality, type);
}); });
}, },
screenshotOrigin(filename = '', format = 'png', quality = 0.92, type = 'base64') {
return this._jessibuca.screenshot(filename, format, quality, type);
}
}, },
} }
</script> </script>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<button @click="handleStop">停止</button> <button @click="handleStop">停止</button>
<button @click="handleDestroy">销毁</button> <button @click="handleDestroy">销毁</button>
<button @click="handleScreenshot">抓拍</button> <button @click="handleScreenshot">抓拍</button>
<button @click="handleScreenshot2">抓拍(原)</button>
<div class="record"> <div class="record">
<input type="text" v-model="recordUrl"> <input type="text" v-model="recordUrl">
<button @click="handleRecord">录像</button> <button @click="handleRecord">录像</button>
...@@ -73,6 +74,10 @@ export default { ...@@ -73,6 +74,10 @@ export default {
console.error(err); console.error(err);
}) })
}, },
handleScreenshot2() {
this.base64Url = this.$refs.vionPlayer.screenshotOrigin();
this.dialogVisible = true;
},
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!