From d47769d53cfa49bce73ddab535ab5261714eec23 Mon Sep 17 00:00:00 2001 From: Wesley Moses Date: Tue, 12 Nov 2024 00:14:46 +0200 Subject: [PATCH] only set poster live update interval when greater than 0 (#580) --- .changeset/sweet-readers-flash.md | 5 +++++ packages/core-web/src/media/controls/controller.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/sweet-readers-flash.md diff --git a/.changeset/sweet-readers-flash.md b/.changeset/sweet-readers-flash.md new file mode 100644 index 00000000..e739dbad --- /dev/null +++ b/.changeset/sweet-readers-flash.md @@ -0,0 +1,5 @@ +--- +"@livepeer/core-web": patch +--- + +only set poster live update interval when greater than 0 diff --git a/packages/core-web/src/media/controls/controller.ts b/packages/core-web/src/media/controls/controller.ts index 81099185..56bc94e6 100644 --- a/packages/core-web/src/media/controls/controller.ts +++ b/packages/core-web/src/media/controls/controller.ts @@ -611,7 +611,7 @@ const addEffectsToStore = ( async ({ thumbnail, live, setPoster, posterLiveUpdate }) => { cleanupPosterImage?.(); - if (thumbnail && live) { + if (thumbnail && live && posterLiveUpdate > 0) { const interval = setInterval(() => { const thumbnailUrl = new URL(thumbnail);