From ecfabb55df60af3b25532c230ca2c9c73cdaf621 Mon Sep 17 00:00:00 2001 From: Serhii Date: Thu, 23 Nov 2023 12:58:15 +0200 Subject: [PATCH] feat(FEC-13450): revert changes for playlist (#669) * 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 a08d40710be1b5db4e4b38d223bdae32539eb3fb. --- flow-typed/types/playlist.js | 4 +--- src/common/playlist/playlist-manager.js | 9 +-------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/flow-typed/types/playlist.js b/flow-typed/types/playlist.js index ca65e1982..2b665187a 100644 --- a/flow-typed/types/playlist.js +++ b/flow-typed/types/playlist.js @@ -53,10 +53,8 @@ type _KPPlaylistObject = { poster?: string, options: KPPlaylistOptions, countdown: KPPlaylistCountdownOptions, - items: Array, - lastEntryId?: string + items: Array }; - declare type KPPlaylistObject = _KPPlaylistObject; /** diff --git a/src/common/playlist/playlist-manager.js b/src/common/playlist/playlist-manager.js index 5a35d7274..b5d3d3d87 100644 --- a/src/common/playlist/playlist-manager.js +++ b/src/common/playlist/playlist-manager.js @@ -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(); } } } @@ -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 => {