no commit message

This commit is contained in:
niandeng
2022-03-06 09:45:14 +08:00
parent e4d8ad649f
commit 743b6ac5df
2 changed files with 38 additions and 16 deletions
+32 -10
View File
@@ -179,6 +179,7 @@
var app='';//平台类型 var app='';//平台类型
var nowRotate=0;//当前视频旋转角度 var nowRotate=0;//当前视频旋转角度
var nowZoom=100;//当前缩放比例 var nowZoom=100;//当前缩放比例
var smallWindowState=false;
/* /*
* into * into
* 功能:初始化,调用播放器则首先调用该函数 * 功能:初始化,调用播放器则首先调用该函数
@@ -2760,6 +2761,9 @@
newEvent.addEventListener('full',fn); newEvent.addEventListener('full',fn);
} }
else{ else{
if(smallWindowState){
return;
}
if(CT.theatre){ if(CT.theatre){
player.exitTheatre(); player.exitTheatre();
} }
@@ -4238,10 +4242,11 @@
*/ */
function windowScroll() { function windowScroll() {
if(!CT.smallWindows) return; if(!CT.smallWindows) return;
if(CT.webFull || CT.theatre){ if(CT.webFull || CT.theatre || CT.full){
if(CK.hasClass('ckplayer-ckplayer-smallwindow')){ if(CK.hasClass('ckplayer-ckplayer-smallwindow')){
CK.removeClass('ckplayer-ckplayer-smallwindow'); CK.removeClass('ckplayer-ckplayer-smallwindow');
eventTarget('smallWindows',false); eventTarget('smallWindows',false);
smallWindowState=false;
allBarShow(); allBarShow();
checkVideoRotate(); checkVideoRotate();
} }
@@ -4252,6 +4257,7 @@
if(!CK.hasClass('ckplayer-ckplayer-smallwindow')){ if(!CK.hasClass('ckplayer-ckplayer-smallwindow')){
CK.addClass('ckplayer-ckplayer-smallwindow'); CK.addClass('ckplayer-ckplayer-smallwindow');
eventTarget('smallWindows',true); eventTarget('smallWindows',true);
smallWindowState=true;
allBarHide(); allBarHide();
checkVideoRotate(); checkVideoRotate();
} }
@@ -4260,6 +4266,7 @@
if(CK.hasClass('ckplayer-ckplayer-smallwindow')){ if(CK.hasClass('ckplayer-ckplayer-smallwindow')){
CK.removeClass('ckplayer-ckplayer-smallwindow'); CK.removeClass('ckplayer-ckplayer-smallwindow');
eventTarget('smallWindows',false); eventTarget('smallWindows',false);
smallWindowState=false;
allBarShow(); allBarShow();
checkVideoRotate(); checkVideoRotate();
} }
@@ -4282,20 +4289,21 @@
'height':nowZoom+'%' 'height':nowZoom+'%'
}); });
if(nowRotate!=0 && nowRotate!=180){ if(nowRotate!=0 && nowRotate!=180){
var widthChange=false;//是否检查了宽度 if(vH>ckW && vW>ckH){
if(vH>=ckW){ if(vH / ckW > vW / ckH) {
CV.css({
'width':nowZoom+'%',
'height':ckW+'px'
});
widthChange=true;
}
if(vW>ckH || (vW==ckH && !widthChange)){
CV.css({ CV.css({
'height':nowZoom+'%', 'height':nowZoom+'%',
'width':ckH+'px' 'width':ckH+'px'
}); });
} }
else {
CV.css({
'width':nowZoom+'%',
'height':ckW+'px'
});
}
return;
}
if(vH<ckW && vW<ckH){ if(vH<ckW && vW<ckH){
if(ckW>ckH){ if(ckW>ckH){
CV.css({ CV.css({
@@ -4317,6 +4325,20 @@
}); });
} }
} }
return;
}
if(vH>=ckW && vW<=ckH){
CV.css({
'width':nowZoom+'%',
'height':ckW+'px'
});
return;
}
if(vW>=ckH && vH<ckW){
CV.css({
'height':nowZoom+'%',
'width':ckH+'px'
});
} }
} }
} }
+1 -1
View File
File diff suppressed because one or more lines are too long