mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
退出全屏 ,需要水印1
This commit is contained in:
@@ -392,12 +392,11 @@ export default {
|
||||
console.log("按键 退出全屏 执行")
|
||||
}
|
||||
})
|
||||
|
||||
// 监听全屏事件的变化,保存数据
|
||||
window.addEventListener("fullscreenchange", () => {
|
||||
this.isFullscreen = this.isFullScreen();
|
||||
});
|
||||
window.addEventListener("keydown", (e) => {
|
||||
this.videoDom.addEventListener("keydown", (e) => {
|
||||
console.log("是否监听到");
|
||||
if(e.keyCode == 27){
|
||||
console.log("是否监听到 esc");
|
||||
|
||||
@@ -167,7 +167,6 @@
|
||||
</div>
|
||||
<!-- 课程单元 -->
|
||||
<div class="course-units" v-if="tab == 1">
|
||||
|
||||
<div :style="`height: ${controlHeight}px;overflow-y: auto;`">
|
||||
<div class="catalog" v-if="courseInfo.type == 20">
|
||||
<div v-for="(item, index) in catalogTree" :key="index" :name="index">
|
||||
@@ -461,7 +460,7 @@
|
||||
let localKey = "user_" + this.userInfo.sysId + "_gids";
|
||||
let hasIds = sessionStorage.getItem(localKey);
|
||||
this.audiences = hasIds ?? ''
|
||||
// this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
||||
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
||||
this.courseId = this.$route.query.id;
|
||||
this.initContentId = this.$route.query.contentId;
|
||||
this.stopStudyTime();//先关闭
|
||||
@@ -1140,7 +1139,7 @@
|
||||
// }
|
||||
// }
|
||||
this.playerBoxShow = false;
|
||||
this.onPlayerPlayFullscreen()
|
||||
// this.onPlayerPlayFullscreen()
|
||||
// this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
||||
let $this = this;
|
||||
//这里有些不准备,如果文件未能加载,这个事件就是错误的
|
||||
@@ -1180,7 +1179,6 @@
|
||||
},
|
||||
|
||||
onFullscreen(full) {
|
||||
console.log("onFullscreen full 点击 exit 退出",full);
|
||||
let divId = 'videowatermark';
|
||||
var div = document.getElementById('myVideoPlayer')
|
||||
if (full) {
|
||||
@@ -1198,17 +1196,15 @@
|
||||
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);
|
||||
} else {
|
||||
console.log("去除水印 ---- gx ----");
|
||||
var markDiv = div.querySelector("#" + divId);
|
||||
console.log("去除水印 ---- gx markDiv ----",markDiv);
|
||||
if (markDiv) {
|
||||
console.log("执行去除水印 ---- gx markDiv ----",markDiv);
|
||||
div.removeChild(markDiv);
|
||||
}
|
||||
}
|
||||
|
||||
// else {
|
||||
// console.log("去除水印 ---- gx ----");
|
||||
// var markDiv = div.querySelector("#" + divId);
|
||||
// console.log("去除水印 ---- gx markDiv ----",markDiv);
|
||||
// if (markDiv) {
|
||||
// console.log("执行去除水印 ---- gx markDiv ----",markDiv);
|
||||
// div.removeChild(markDiv);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
onPlayerPause() {
|
||||
//console.log("暂停");
|
||||
|
||||
Reference in New Issue
Block a user