视频播放笔记记录时间的控制

This commit is contained in:
daihh
2022-10-19 21:46:50 +08:00
parent 085d71ea49
commit 3625677357
4 changed files with 125 additions and 87 deletions

View File

@@ -524,6 +524,16 @@ export default {
document.msFullScreen
);
},
//开始播放
startPlay:function(newTime){
if(newTime){
this.videoDom.currentTime = newTime;
this.barrageTimelineStart = newTime;
this.updateProgressBySetTime(newTime);
}
this.isPlaying = true;
this.videoDom.play();
},
},
watch: {
currentVolume: function () {
@@ -539,13 +549,13 @@ export default {
this.$emit('onPlayerEnded', {})
}
},
notePlay: function(val) {
if(val) {
this.updateProgressBySetTime(val);
this.isPlaying = true;
this.videoDom.play();
}
},
// notePlay: function(val) {
// if(val) {
// this.updateProgressBySetTime(val);
// this.isPlaying = true;
// this.videoDom.play();
// }
// },
src: function () {
// 当视频地址变更时,重载视频
this.videoDom.load();

View File

@@ -49,7 +49,7 @@ export default {
};
},
mounted() {
console.log(this.isDrag,'isDrag');
//console.log(this.isDrag,'isDrag');
//初始化一些固定数据
let dom_full = this.$el.getElementsByClassName("progress-full")[0];
this.dom_full = dom_full;