Reduce latency to < 100ms

This commit is contained in:
FireMasterK 2020-11-16 15:35:25 +05:30
parent 19a134b441
commit 94aa8acb93
No known key found for this signature in database
GPG Key ID: 8DFF5DD33E93DB58

View File

@ -179,8 +179,11 @@ export default {
}
if (this.audioplayer) {
if (Math.abs(this.audioplayer.currentTime - this.player.currentTime()) > 0.25) {
this.audioplayer.currentTime = this.player.currentTime()
const delay = this.audioplayer.currentTime - this.player.currentTime()
if (Math.abs(delay) > 0.1) {
this.audioplayer.currentTime = this.player.currentTime() - delay
}
}
});