Skip to content

Commit

Permalink
Update video seek time condition
Browse files Browse the repository at this point in the history
  • Loading branch information
sazedul-haque committed Aug 24, 2023
1 parent a7c9931 commit 5629910
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion assets/react/front/tutor-front.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ jQuery(document).ready(function($) {
data_send = Object.assign(data, options);
}
$.post(this.ajaxurl, data_send);
this.max_seek_time = video_data.best_watch_time > instance.currentTime ? video_data.best_watch_time : instance.currentTime;

const seekTime = video_data.best_watch_time > instance.currentTime ? video_data.best_watch_time : instance.currentTime;
if (seekTime > this.max_seek_time) {
this.max_seek_time = seekTime;
}
},
autoload_content: function() {
console.log('Autoloader called');
Expand Down

0 comments on commit 5629910

Please sign in to comment.