提交 2c772e59 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-coursedetail-0817' of...

Merge branch 'dev-coursedetail-0817' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-professional-exam into dev-coursedetail-0817

* 'dev-coursedetail-0817' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-professional-exam:
  修改视频播放
...@@ -143,6 +143,7 @@ export default { ...@@ -143,6 +143,7 @@ export default {
}, },
created() { created() {
this.vid = `video_${this._uid}`; this.vid = `video_${this._uid}`;
this.playTime = 0;
const ua = navigator.userAgent; const ua = navigator.userAgent;
// this.isWechat = ua.match(/(MicroMessenger)\/([\d.]+)/); // this.isWechat = ua.match(/(MicroMessenger)\/([\d.]+)/);
this.isAndroid = ua.match(/(Android);?[\s\/]+([\d.]+)?/); this.isAndroid = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
...@@ -180,6 +181,7 @@ export default { ...@@ -180,6 +181,7 @@ export default {
this.player.style.display = 'block'; this.player.style.display = 'block';
if (isPaused) { if (isPaused) {
this.player.play(); this.player.play();
this.playTime++;
this.showProved = false; this.showProved = false;
} else { } else {
this.player.pause(); this.player.pause();
...@@ -219,6 +221,9 @@ export default { ...@@ -219,6 +221,9 @@ export default {
this.reportOnOff(2); this.reportOnOff(2);
} }
this.reportLeave(); this.reportLeave();
if (this.playTime === 0) {
this.player.play();
}
this.switchUrl(opts); this.switchUrl(opts);
this.player.autoplay = true; this.player.autoplay = true;
if (!this.enable) { if (!this.enable) {
...@@ -321,6 +326,7 @@ export default { ...@@ -321,6 +326,7 @@ export default {
if (this.isPaused) { if (this.isPaused) {
this.player.style.display = 'block'; this.player.style.display = 'block';
this.player.play(); this.player.play();
this.playTime++;
this.isPaused = false; this.isPaused = false;
this.reportOnOff(1); this.reportOnOff(1);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册