Skip to content

Commit

Permalink
fix: Seek delay for Cast Nest hub (#7423)
Browse files Browse the repository at this point in the history
Fuchsia devices need more time to seek. 1 second is not enough and 3 look a correct value
related to this
#7424
  • Loading branch information
Iragne authored and joeyparrish committed Oct 18, 2024
1 parent 3addfa2 commit 465174c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/media/playhead.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 465174c

Please sign in to comment.