diff options
| author | RblSb <msrblsb@gmail.com> | 2020-04-21 22:31:01 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-04-21 22:31:01 +0300 |
| commit | 4b46cbaf8c2c18d4cbf50c6e7a5665c586b2ea96 (patch) | |
| tree | 36019bdaeeddeed9fb6c0cbd8ebad57266265a1d /res | |
| parent | 966e27407f74e5a5537d7e70ef32170bbfa760f0 (diff) | |
Fix video restart after end
Diffstat (limited to 'res')
| -rw-r--r-- | res/client.js | 9 |
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; |
