diff options
| author | RblSb <msrblsb@gmail.com> | 2020-10-10 20:58:39 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-10-10 20:58:39 +0300 |
| commit | 66fb4a0158d8cfd9887db04ba44b7dd3f38cbdd3 (patch) | |
| tree | a207d13faa6436569ab3c379fb3d870301721096 /res | |
| parent | 7df8a33c7b1c6cc7d18bde2586a3224b02686a95 (diff) | |
Keep video cache on play event
Diffstat (limited to 'res')
| -rw-r--r-- | res/client.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/res/client.js b/res/client.js index e0ad935..c3e9d60 100644 --- a/res/client.js +++ b/res/client.js @@ -1286,7 +1286,11 @@ client_Main.prototype = { if((this.personal.group & 2) != 0) { return; } - this.player.setTime(data.play.time); + var synchThreshold = this.settings.synchThreshold; + var newTime = data.play.time; + if(Math.abs(this.player.getTime() - newTime) >= synchThreshold) { + this.player.setTime(newTime); + } this.player.play(); break; case "PlayItem": |
