Skip to content

Commit

Permalink
fix(FEC-14058): Playlist - Loading Youtube and Image entries throws a…
Browse files Browse the repository at this point in the history
…n error
  • Loading branch information
SivanA-Kaltura authored Jul 22, 2024
1 parent 7adc172 commit 31130fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1918,8 +1918,7 @@ export default class Player extends FakeEventTarget {
this._engine = this._engineDecoratorManager ? (new EngineDecorator(engine, this._engineDecoratorManager) as EngineDecoratorType) : engine;

if (this._cachedUrls.length) {
this._engine.setCachedUrls(this._cachedUrls);
this._cachedUrls = [];
this.setCachedUrls(this._cachedUrls);
}
}

Expand Down Expand Up @@ -2881,7 +2880,7 @@ export default class Player extends FakeEventTarget {
public setCachedUrls(cachedUrls: string[]): void {
this._cachedUrls = cachedUrls;

if (this._engine) {
if (this._engine && this._engine.setCachedUrls) {
this._engine.setCachedUrls(cachedUrls);
this._cachedUrls = [];
}
Expand Down

0 comments on commit 31130fe

Please sign in to comment.