var meet = {
_w: document.documentElement.clientWidth,
_h: document.documentElement.clientWidth,
init: function () {
this.videoHeight = this.getHeight(16 / 9);
this.active();
this.initSwiper();
this.touchSwipeReview();
this.showShare();
this.closeShare();
this.showReviewPoint();
this.showCurrentPoint();
this.reviewPointVideo();
},
initVideo: function (id, pic) {
var _this = this;
var player = new Txplayer({
containerId: 'mod-player',
vid: id,
width: _this._w,
height: _this.videoHeight,
poster: pic
});
},
getHeight: function (scale) {
return this._w / scale;
},
active: function () {
var _this = this;
$('.mod-player').css({
'width': _this._w,
'height': _this.videoHeight
});
$('#vide-content').css({
'margin-top': (_this._h - _this.videoHeight) / 2
})
document.querySelector('body').addEventListener('touchmove', function (e) {
if (!document.querySelector('.review-more').contains(e.target)) {
e.preventDefault();
}
})
_this.initVideo('j0511ygervb', 'http://external-1255598498.file.myqcloud.com/public_h5/%E8%94%9A%E6%9D%A5H5/pic/%E5%B0%81%E9%9D%A2%E5%9B%BE.JPG');
},
initSwiper: function () {
var mySwiper = new Swiper('.swiper-container', {
direction: 'vertical',
loop: false,
pagination: '.swiper-pagination',
speed: 200,
onSlideChangeStart: function (swiper) {
console.log(swiper.activeIndex);
if (swiper.activeIndex === 2) {
$('.slider-up').addClass('slider-up-guide');
} else { }
}
})
},
touchSwipeReview: function () {
$(".review").swipe({
swipe: function (event, direction, distance, duration, fingerCount, fingerData) {
if (direction === 'up') {
}
}
});
},
showShare: function () {
$('#qrcodeShow').on('click', function () {
$('.share').fadeIn();
})
},
closeShare: function () {
$('.share').on('click', function () {
$(this).fadeOut();
})
},
showReviewPoint: function () {
$('#showReviewPoint').on('click', function () {
$('#reviewPoint').fadeIn();
})
$('#hideReviewPoint').on('click', function () {
$('#reviewPoint').fadeOut();
})
},
showCurrentPoint: function () {
$('#showCurrentPoint').on('click', function () {
$('#currentPoint').fadeIn();
})
$('#hideCurrentPoint').on('click', function () {
$('#currentPoint').fadeOut();
})
},
reviewPointVideo: function () {
var _this = this;
var player;
$('.show-video').on('click', function () {
var vid = $(this).attr('data-vid');
console.log(vid)
player = new Txplayer({
containerId: 'vide-content',
vid: vid,
width: _this._w,
height: _this.videoHeight
});
$('.modal-video').fadeIn();
})
$('.close-modal').on('click', function () {
$('.modal-video').fadeOut();
$('#vide-content').empty();
})
}
} $(document).ready(function () {
$('body').on('touchmove', function (event) {
});
meet.init();
});

  

最新文章

  1. django使用笔记
  2. Android使用 LruCache 缓存图片
  3. 进程间通信的WM_COPYDATA的使用
  4. Mysql在windows下的免安装配置步骤和重新安装的步骤
  5. java基础学习总结三(jdk7新特性、变量(局部变量和成员变量)、常量以及运算符)
  6. [Head First设计模式笔记]----命令模式
  7. dbcp写连接池 Demo
  8. Ruby中有意思的块
  9. Poj3321 Apple tree
  10. impala和kudu使用的小细节
  11. 秋日上新!H5活动之家营销平台升级大盘点!
  12. white-space:pre-wrap和word-break:break-all;
  13. Spring Cloud Finchley 正式发布,包含 4 个重大更新!
  14. python base64加密文本内容(1)
  15. html css float left与 float right的使用说明(转)
  16. 简话Angular 08 Angular ajax
  17. 现代软件工程构建之法 前五章阅读感想&困惑
  18. Object类和包装类的一些方法
  19. bzoj 1433 二分图匹配
  20. libsvm以概率输出单个test样例的判别结果

热门文章

  1. Java ——流(Stream)、文件(File)和IO
  2. Python文件读写基本操作
  3. 执行 bower -v 时出现内部错误
  4. if you don't go after what you want, you'll never have it
  5. 20191105 《Spring5高级编程》笔记-第10章
  6. CEPH安装(CentOS 7)
  7. MySQL-第十五篇使用连接池管理连接
  8. [2019杭电多校第七场][hdu6651]Final Exam
  9. [BZOJ 2820] YY的gcd(莫比乌斯反演+数论分块)
  10. HDU-3665 Seaside