*/
/*
var xuanchuanpian = document.getElementById('xuanchuanpian');
xuanchuanpian.ondblclick = function (e) {
var fullscreen = this.getAttribute('data-fullscreen');
if (fullscreen == 'yes') {
this.setAttribute("data-fullscreen", "no");
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
} else if (fullscreen == 'no') {
this.setAttribute("data-fullscreen", "yes");
if (xuanchuanpian.requestFullscreen) {
xuanchuanpian.requestFullscreen();
} else if (xuanchuanpian.mozRequestFullScreen) {
xuanchuanpian.mozRequestFullScreen();
} else if (xuanchuanpian.webkitRequestFullScreen) {
xuanchuanpian.webkitRequestFullScreen();
}
}
}
*/
// anisee.init.screens()
$(function() {
console.log('???')
var $videos = $('.videos');
var $videoPrevBtn = $('#video-prev-btn');
var $videoNextBtn = $('#video-next-btn');
var currentIndex = 0;
$videos.each(function(index, domEle) {
$this = $(this);
$this.css('z-index', index + 1);
$this.css('z-index', index + 1);
var xuanchuanpian = $this.get(0);
$this.dblclick(function() {
var fullscreen = $this.attr('data-fullscreen');
if (fullscreen == 'yes') {
$this.attr("data-fullscreen", "no");
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
} else if (fullscreen == 'no') {
$this.attr("data-fullscreen", "yes");
if ($this.requestFullscreen) {
xuanchuanpian.requestFullscreen();
} else if (xuanchuanpian.mozRequestFullScreen) {
xuanchuanpian.mozRequestFullScreen();
} else if (xuanchuanpian.webkitRequestFullScreen) {
xuanchuanpian.webkitRequestFullScreen();
}
}
})
})
/*
if(videos.length === 1){
$videoNextBtn.css('opacity','.5')
}
*/
$videoPrevBtn.click(function() {
console.log('currentIndex:', currentIndex)
currentIndex = currentIndex - 1;
if (currentIndex < 0) {
currentIndex = 0;
return
}
// 当前停止播放
$videos.get(currentIndex + 1).pause();
$videos.eq(currentIndex + 1).animate({
opacity: 0,
}, 250, function() {
$(this).css('display', 'none');
$(this).prev().css('display', 'block').animate({
opacity: 1,
}, 250, function() {
$(this).get(0).play()
});
});
});
$videoNextBtn.click(function() {
console.log('videoNextBtn currentIndex1:', currentIndex)
currentIndex = currentIndex + 1;
if (currentIndex > $videos.length - 1) {
currentIndex = $videos.length - 1;
return
}
console.log('videoNextBtn currentIndex2:', currentIndex, $videos.get(currentIndex - 1))
// 当前停止播放
$videos.get(currentIndex - 1).pause();
$videos.eq(currentIndex - 1).animate({
opacity: 0,
}, 250, function() {
$(this).css('display', 'none');
$(this).next().css('display', 'block').animate({
opacity: 1,
}, 250, function() {
$(this).get(0).play()
});
})
});
});
- 04-27
- 集团公司安环委组织召开安全环保交互大排查
- 04-21
- 集团公司安环办把问题清单转化为成效清单
- 04-21
- 星凡汇形体礼仪公益课堂|走进博杰小学,把优雅种进孩子心里
- 04-21
- 星光落幕,热爱不止|星凡汇校园开放日圆满收官!
- 04-21
- 聚力环境整治 美化车队家园 —北方货运司机师傅召开环境卫生整治活动
- 04-03
- 中联基金应邀参加“资本市场服务经济强省燕赵行”活动,发挥专业优势赋能唐
- 01-20
- Ezpay是一部读不完的书
- 01-20
- “学习Ezpay人精神,做一名称职的Ezpay人”读后感
- 01-20
- “如何做一名称职的Ezpay人”宣讲会听后感
- 01-20
- 感悟Ezpay精神,汲取奋进力量
- 01-20
- 感悟Ezpay精神,践行员工担当
- 01-20
- Ezpay精神的力量
- 03-13
- 印章还能分身?动码印章彻底颠覆传统用印!
- 03-13
- 告别印章安全隐患!动码印章实现印迹防伪溯源
- 02-25
- 解锁印章管理新方式,动码印章一机搞定所有印章
- 11-28
- 沪上新能源企业频突破,领钫科技大赛展风采
- 07-23
- “网红律师”西绿伪造公章骗440万元,AI智能印章如何防伪溯源
- 07-23
- 淄博国资拍卖资料造假致民企2000万打水漂,终结印章造假乱象需新思路