退出全屏 ,需要水印11

This commit is contained in:
gengxin
2025-03-11 11:45:34 +08:00
parent 6536e36857
commit 51a8da4bdb
2 changed files with 4 additions and 21 deletions

View File

@@ -619,7 +619,9 @@ export default {
*/
handleFullscreenChange() {
console.log("handleFullscreenChange gx this.isFullScreen()",this.isFullScreen())
if(!this.isFullScreen()){
console.log("handleFullscreenChange gx this.isFullscreen",this.isFullscreen)
if(this.isFullscreen){
this.isFullscreen = !!document.fullscreenElement;
if (!this.isFullscreen) {
// 退出全屏后的逻辑(如暂停视频、更新 UI 等)

View File

@@ -1158,26 +1158,7 @@
// }
// }
},
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) {
let divId = 'videowatermark';
var div = document.getElementById('myVideoPlayer')