mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
播放加上水印
This commit is contained in:
@@ -1140,7 +1140,8 @@
|
||||
// }
|
||||
// }
|
||||
this.playerBoxShow = false;
|
||||
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
||||
this.onPlayerPlayFullscreen()
|
||||
// this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
||||
let $this = this;
|
||||
//这里有些不准备,如果文件未能加载,这个事件就是错误的
|
||||
this.isAppendTime=true;
|
||||
@@ -1158,6 +1159,26 @@
|
||||
// }
|
||||
// }
|
||||
},
|
||||
|
||||
onPlayerPlayFullscreen(){
|
||||
let divId = 'videowatermark';
|
||||
var div = document.getElementById('myVideoPlayer')
|
||||
var div3 = document.createElement("div");
|
||||
div3.id = divId;
|
||||
div3.setAttribute("class", "fullmark");
|
||||
div3.innerHTML = '';
|
||||
//从父组件传过来的水印内容
|
||||
//div3.innerText =this.userInfo.name+this.userInfo.code;
|
||||
for (var i = 0; i < 8; i++) {
|
||||
div3.innerHTML +=
|
||||
'<div style="color:#ffffff;width: 40%;height: 155px;padding-left:60px;padding-top:50px; display: flex;justify-content: center; transform: rotate(-36deg);font-size:20px;">' +
|
||||
this.userInfo.name + this.userInfo.loginName + '</div>';
|
||||
}
|
||||
div3.style.cssText =
|
||||
"position:absolute;pointer-events: none; width: 100%;height: 100%;top:0;left:0;bottom: 0;right: 0; display: flex;justify-content: center;flex-wrap: wrap;overflow: hidden; opacity:0.3;padding-top:10px";
|
||||
div.appendChild(div3);
|
||||
},
|
||||
|
||||
onFullscreen(full) {
|
||||
console.log("onFullscreen full 点击 exit 退出",full);
|
||||
let divId = 'videowatermark';
|
||||
|
||||
Reference in New Issue
Block a user