Skip to content

Commit

Permalink
feat(FEC-13450): revert changes for playlist (#669)
Browse files Browse the repository at this point in the history
* feat(FEC-13450): resume playlist from last entry

* feat(FEC-13450): trigger build

* feat(FEC-13450): fix flow errors

* Revert "feat(FEC-13450): resume playlist from last entry (#668)"

This reverts commit a08d407.
  • Loading branch information
semarche-kaltura authored Nov 23, 2023
1 parent a08d407 commit ecfabb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 1 addition & 3 deletions flow-typed/types/playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ type _KPPlaylistObject = {
poster?: string,
options: KPPlaylistOptions,
countdown: KPPlaylistCountdownOptions,
items: Array<PlaylistItem>,
lastEntryId?: string
items: Array<PlaylistItem>
};

declare type KPPlaylistObject = _KPPlaylistObject;

/**
Expand Down
9 changes: 1 addition & 8 deletions src/common/playlist/playlist-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ class PlaylistManager {
});
this._player.dispatchEvent(new FakeEvent(PlaylistEventType.PLAYLIST_LOADED, {playlist: this}));
this._addBindings();
const lastEntryIdIndex = config.lastEntryId ? this._mediaInfoList.findIndex(item => item.entryId === config.lastEntryId) : -1;
if (lastEntryIdIndex !== -1) {
this.playItem(lastEntryIdIndex);
} else {
this.playNext();
}
this.playNext();
}
}
}
Expand Down Expand Up @@ -235,8 +230,6 @@ class PlaylistManager {
poster: (playlistData.poster: string),
options: playlistConfig ? playlistConfig.options : this._options,
countdown: playlistConfig ? playlistConfig.countdown : this.countdown,
// $FlowFixMe
lastEntryId: playlistData.playlistLastEntryId,
items: playlistData.items.map((item, index) => {
const itemData = Utils.Object.copyDeep(item);
['sources.dvr', 'sources.type'].forEach(omitKey => {
Expand Down

0 comments on commit ecfabb5

Please sign in to comment.