|
@@ -1,13 +1,15 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<h2 class="tc">
|
|
|
+ <span style="float: left;" v-if="nextFaceTick" >
|
|
|
+ <span style="font-size: 10px;">倒计时:{{nextFaceTick}}S</span>
|
|
|
+ </span>
|
|
|
<span>{{curTimes|useTime}}</span>
|
|
|
<strong>/</strong>
|
|
|
<span>{{media.duration|useTime}}</span>
|
|
|
</h2>
|
|
|
<el-row style="width: 1100px;">
|
|
|
<el-col :span="18" style="width:680px;">
|
|
|
-
|
|
|
<div style="height: 540px;">
|
|
|
<video-player id="myVideo" class="video-player-box" ref="videoPlayer"
|
|
|
@pause="onPlayerPause($event)"
|
|
@@ -16,7 +18,6 @@
|
|
|
@timeupdate="onPlayerTimeupdate($event)" @ended="onPlayerEnded($event)" :globalOptions="{controls:true}"
|
|
|
:options="options">
|
|
|
</video-player>
|
|
|
-
|
|
|
</div>
|
|
|
|
|
|
<div class="tc">
|
|
@@ -125,6 +126,7 @@
|
|
|
tickNum: 0,
|
|
|
prevTime: 0,
|
|
|
isReady: false,
|
|
|
+ nextFaceTick: 0,
|
|
|
identifyFaceDialog: false,
|
|
|
startPlay: false, // 开始认证
|
|
|
nextFaceTime: 0,
|
|
@@ -236,7 +238,7 @@
|
|
|
})
|
|
|
},
|
|
|
destroyTimer() {
|
|
|
- if (this.timer) clearInterval(this.timer);
|
|
|
+ if (this.timer) clearTimeout(this.timer);
|
|
|
},
|
|
|
goState(item) {
|
|
|
if (item.name == this.activeChapter) {
|
|
@@ -249,12 +251,14 @@
|
|
|
this.$emit('loadMedia', item, index)
|
|
|
},
|
|
|
startTick() {
|
|
|
+ console.log( "startTick")
|
|
|
let tick = this.tryTick;
|
|
|
this.destroyTimer();
|
|
|
this.tickNum = 0;
|
|
|
this.timer = setTimeout(tick, 1 * 1000);
|
|
|
},
|
|
|
stopTick() {
|
|
|
+ console.log( "stopTick")
|
|
|
if (this.timer) clearInterval(this.timer);
|
|
|
},
|
|
|
tryTick() {
|
|
@@ -394,8 +398,10 @@
|
|
|
this.tickNum++
|
|
|
let now = Date.now()
|
|
|
// 人脸认证期间 关闭播放
|
|
|
+
|
|
|
if( !this.closeFace ){
|
|
|
- //
|
|
|
+ this.nextFaceTick = 0;
|
|
|
+ //
|
|
|
if( this.identifyFaceDialog ) {
|
|
|
// 在播放中,关闭播放
|
|
|
if( this.onPlay ){
|
|
@@ -422,6 +428,7 @@
|
|
|
this.startIdentify();
|
|
|
return;
|
|
|
}
|
|
|
+ this.nextFaceTick = parseInt( (this.nextFaceTime-now )/1000);
|
|
|
}
|
|
|
}
|
|
|
// 未开始
|