Commit db83abe4 by wangshuo

播放视频定时器

parent c4180fe2
...@@ -532,7 +532,7 @@ class Video extends Component { ...@@ -532,7 +532,7 @@ class Video extends Component {
if(this.state.course.is_aist) { if(this.state.course.is_aist) {
this.getShareProgressInfo() this.getShareProgressInfo()
} }
clearInterval(this.timer) clearInterval(this.timer);
}) })
this.player.on('seeked', () => { this.player.on('seeked', () => {
this.sendRecord() this.sendRecord()
...@@ -562,9 +562,10 @@ class Video extends Component { ...@@ -562,9 +562,10 @@ class Video extends Component {
if (index === this.state.activeIndex) { if (index === this.state.activeIndex) {
return return
} }
console.log('selectVideo'); console.log('selectVideo 先发送时间 在发送进度 在重置定时器');
this.sendWatchTime(this.watchSec, this.currentPlaybackRate)
this.countSchedule(); // 计算进度 this.countSchedule(); // 计算进度
this.setupTimer();
this.setState( this.setState(
{ {
...@@ -579,7 +580,7 @@ class Video extends Component { ...@@ -579,7 +580,7 @@ class Video extends Component {
this.getCoursePrice(); this.getCoursePrice();
} }
} }
) );
} }
getLastVideoIndex = lastIndex => { getLastVideoIndex = lastIndex => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment