mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-06 17:36:42 +08:00
退出全屏 ,需要水印11
This commit is contained in:
@@ -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 等)
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user