From 771ea6974a6dc997a1e4b89aeccfe2d51f4628fb Mon Sep 17 00:00:00 2001 From: Sivan Agranov <88330203+SivanA-Kaltura@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:55:04 +0300 Subject: [PATCH] fix(FEC-13426): Player v7| playlist| image entry cover the whole player and the user cannot navigate to another entry Image entries in playlist should always be timed images (with the source having duration) so that the ui shows prev and next buttons for them. In playlist manager we check for the entry type to see if it's an image, and if so, we set the source duration to imageDuration (a field of the playlist). At the point where we test this condition, playlistItem might have an empty type field, as its value set only after it's is copied from the source after setMedia. This would fail the condition and have duration stay not set. The fix is to check the type of the source itself instead of checking the type of the playlistItem. --- src/common/playlist/playlist-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/playlist/playlist-manager.js b/src/common/playlist/playlist-manager.js index 71c162fac..b5d3d3d87 100644 --- a/src/common/playlist/playlist-manager.js +++ b/src/common/playlist/playlist-manager.js @@ -270,7 +270,7 @@ class PlaylistManager { } _onChangeSourceStarted(): void { - if (this._playlist.items[this._playlist._activeItemIndex].sources?.type === 'Image') { + if (this._player.isImage()) { this._player.configure({sources: {duration: this._options.imageDuration}}); } }