Skip to content

Commit

Permalink
fix(FEC-13426): Player v7| playlist| image entry cover the whole play…
Browse files Browse the repository at this point in the history
…er 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.
  • Loading branch information
SivanA-Kaltura authored Oct 26, 2023
1 parent 352afc7 commit 771ea69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/playlist/playlist-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}});
}
}
Expand Down

0 comments on commit 771ea69

Please sign in to comment.