aboutsummaryrefslogtreecommitdiffstats
path: root/res/client.js
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-04-21 22:31:01 +0300
committerRblSb <msrblsb@gmail.com>2020-04-21 22:31:01 +0300
commit4b46cbaf8c2c18d4cbf50c6e7a5665c586b2ea96 (patch)
tree36019bdaeeddeed9fb6c0cbd8ebad57266265a1d /res/client.js
parent966e27407f74e5a5537d7e70ef32170bbfa760f0 (diff)
Fix video restart after end
Diffstat (limited to 'res/client.js')
-rw-r--r--res/client.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/res/client.js b/res/client.js
index a6dae56..9637f8a 100644
--- a/res/client.js
+++ b/res/client.js
@@ -1131,6 +1131,9 @@ client_Main.prototype = {
this.player.setTime(time,false);
return;
}
+ if(this.player.getDuration() < this.player.getTime()) {
+ return;
+ }
if(!data.getTime.paused) {
this.player.play();
} else {
@@ -1868,6 +1871,12 @@ client_Player.prototype = {
}
this.player.pause();
}
+ ,getDuration: function() {
+ if(this.itemPos >= this.items.length) {
+ return 0;
+ }
+ return this.items[this.itemPos].duration;
+ }
,getTime: function() {
if(this.player == null) {
return 0;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage