Don't seek if saved position is > 90% of the video.

Closes #1277
This commit is contained in:
Kavin 2022-08-06 15:43:41 +05:30
parent a574cedea3
commit cd689ea3c7
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -229,8 +229,11 @@ export default {
var request = store.get(this.video.id); var request = store.get(this.video.id);
request.onsuccess = function (event) { request.onsuccess = function (event) {
var video = event.target.result; var video = event.target.result;
if (video?.currentTime) { const currentTime = video?.currentTime;
videoEl.currentTime = video.currentTime; if (currentTime) {
if (currentTime < component.video.duration * 0.9) {
videoEl.currentTime = currentTime;
}
} }
}; };