Saving & restoring video watching progress
Video progress updates: - Mark as 'done' when 90% or more is watched. - Keep 'done' flag when re-watching. The video progress is stored on three events, whichever comes first: - Every 30 seconds of video. - Every 10% of the video. - Every pause/stop/navigation to another page. - When we detect the video is looping.
This commit is contained in:
@@ -67,6 +67,14 @@ script(type="text/javascript").
|
||||
});
|
||||
this.hotkeys();
|
||||
|
||||
{% if current_user.is_authenticated %}
|
||||
let fetch_progress_url = '{{ url_for("users_api.get_video_progress", video_id=node._id) }}';
|
||||
let report_url = '{{ url_for("users_api.set_video_progress", video_id=node._id) }}';
|
||||
this.progressPlugin({
|
||||
'report_url': report_url,
|
||||
'fetch_progress_url': fetch_progress_url,
|
||||
});
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function addVideoPlayerButton(data) {
|
||||
|
Reference in New Issue
Block a user