no commit message
This commit is contained in:
+37
-15
@@ -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({
|
CV.css({
|
||||||
'width':nowZoom+'%',
|
'height':nowZoom+'%',
|
||||||
'height':ckW+'px'
|
'width':ckH+'px'
|
||||||
});
|
});
|
||||||
widthChange=true;
|
}
|
||||||
|
else {
|
||||||
|
CV.css({
|
||||||
|
'width':nowZoom+'%',
|
||||||
|
'height':ckW+'px'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if(vW>ckH || (vW==ckH && !widthChange)){
|
|
||||||
CV.css({
|
|
||||||
'height':nowZoom+'%',
|
|
||||||
'width':ckH+'px'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if(vH<ckW && vW<ckH){
|
if(vH<ckW && vW<ckH){
|
||||||
if(ckW>ckH){
|
if(ckW>ckH){
|
||||||
CV.css({
|
CV.css({
|
||||||
@@ -4316,7 +4324,21 @@
|
|||||||
'width':ckH+'px'
|
'width':ckH+'px'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user