From 2997dc0284b06f8b846f0fc36fba085da1f4070b Mon Sep 17 00:00:00 2001 From: Iragne Date: Fri, 18 Oct 2024 11:43:26 +0200 Subject: [PATCH] fix: Seek delay for Cast Nest hub (#7423) Fuchsia devices need more time to seek. 1 second is not enough and 3 look a correct value related to this https://github.com/shaka-project/shaka-player/issues/7424 --- lib/media/playhead.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/media/playhead.js b/lib/media/playhead.js index 03277b84ca..aeb230ec86 100644 --- a/lib/media/playhead.js +++ b/lib/media/playhead.js @@ -427,7 +427,9 @@ shaka.media.MediaSourcePlayhead = class { // infinite loop on systems where changing currentTime takes a // significant amount of time (e.g. Chromecast). const time = Date.now() / 1000; - if (!this.lastCorrectiveSeek_ || this.lastCorrectiveSeek_ < time - 1) { + const seekDelay = shaka.util.Platform.isFuchsiaCastDevice() ? 3 : 1; + if (!this.lastCorrectiveSeek_ || + this.lastCorrectiveSeek_ < time - seekDelay) { this.lastCorrectiveSeek_ = time; canCorrectiveSeek = true; }