Skip to content

Commit

Permalink
fix(FEC-11711): loadMedia is triggered before configuration is set fr…
Browse files Browse the repository at this point in the history
…om getMediaConfig (#508)

move `setSources` after `configure`
  • Loading branch information
yairans authored Dec 10, 2021
1 parent dbe7003 commit 15b90e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/kaltura-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,13 @@ class KalturaPlayer extends FakeEventTarget {
const localPlayerConfig = Utils.Object.mergeDeep({}, config);
delete localPlayerConfig.plugins;
if (localPlayerConfig.sources) {
this._localPlayer.setSources(localPlayerConfig.sources || {});
const {sources} = localPlayerConfig;
delete localPlayerConfig.sources;
this._localPlayer.configure(localPlayerConfig);
this._localPlayer.setSources(sources || {});
} else {
this._localPlayer.configure(localPlayerConfig);
}
this._localPlayer.configure(localPlayerConfig);
const uiConfig = config.ui;
if (uiConfig) {
this._uiWrapper.setConfig(configDictionary.ui);
Expand Down

0 comments on commit 15b90e9

Please sign in to comment.