no commit message

This commit is contained in:
niandeng
2022-03-24 11:20:36 +08:00
parent 0a255721c0
commit 47a1423941
2 changed files with 11 additions and 3 deletions
+10 -2
View File
@@ -223,6 +223,12 @@
* newEvent是提供给播放器外部监听函数使用的,如监听时间player.time(function(t){console.log('已播放:'+t);});
*/
eventTarget();
/*
* 监听页面标签状态(判断是否失去焦点)
*/
documentHidden(function(state){
eventTarget('visibilityState',state);
});
/*
* 判断平台类型,主要是判断是否是iphone类型的平台
*/
@@ -3422,7 +3428,10 @@
*/
visibilityState:function(fn){
if(!isUndefined(fn) && valType(fn)=='function'){
documentHidden(fn);
if(!isUndefined(document.visibilityState)){
fn(document.visibilityState === 'visible'?'show':'hidden');
}
newEvent.addEventListener('visibilityState',fn);
}
return this;
},
@@ -7305,7 +7314,6 @@
fn(document.visibilityState === 'visible'?'show':'hidden');
});
}
}
return ckplayerEmbed;
}));
+1 -1
View File
File diff suppressed because one or more lines are too long