mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-08 02:16:43 +08:00
还原拉取进度条的时间
This commit is contained in:
@@ -292,8 +292,6 @@ export default {
|
||||
fullTimeFormat: "00:00:00", // 视频总长度的文字
|
||||
barrageTimelineStart: 0, // 弹幕时间轴的起始时间点(手动调整进度条触发更新)
|
||||
isInit:false, // 是否初始化过
|
||||
videoTime:0,
|
||||
oldVideoTime:0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -378,9 +376,6 @@ export default {
|
||||
this.videoDom.pause();
|
||||
this.isPlaying = false;
|
||||
this.$emit('onPlayerPause', {})//暂停(暂停时调用)
|
||||
// 清楚记录的时间
|
||||
this.videoTime = 0
|
||||
this.oldVideoTime = 0
|
||||
}
|
||||
this.isShowCover = false;
|
||||
},
|
||||
@@ -561,18 +556,6 @@ export default {
|
||||
this.isPlaying = false;
|
||||
this.$emit('onPlayerEnded', {})
|
||||
}
|
||||
// 拉伸进度条计时长
|
||||
if(this.isPlaying){
|
||||
this.videoTime = this.videoDom.currentTime
|
||||
let sendTime = this.videoTime -this.oldVideoTime
|
||||
// console.log('sendTime', sendTime)
|
||||
// 超过两秒就算是拉进度了
|
||||
if(sendTime > 2 && this.oldVideoTime !== 0){
|
||||
console.log('开始计时发送sendTime',sendTime);
|
||||
this.$emit('onPlayerSendTime', sendTime)
|
||||
}
|
||||
this.oldVideoTime = this.videoDom.currentTime
|
||||
}
|
||||
},
|
||||
// notePlay: function(val) {
|
||||
// if(val) {
|
||||
|
||||
Reference in New Issue
Block a user