From ad0af39eaf35958c6bee6ec597b68477b86f770f Mon Sep 17 00:00:00 2001 From: lianbenjamin <79077248+lianbenjamin@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:06:46 +0300 Subject: [PATCH] move to setMedia to support playlist --- src/kaltura-player.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kaltura-player.ts b/src/kaltura-player.ts index b2450359a..8452fa8da 100644 --- a/src/kaltura-player.ts +++ b/src/kaltura-player.ts @@ -169,7 +169,6 @@ export class KalturaPlayer extends FakeEventTarget { this._appPluginConfig = mergedPluginsConfigAndFromApp[1]; this.configure(getDefaultRedirectOptions({ sources: this.sources }, mediaConfig)); this.setMedia(mediaConfig); - this._configureMediaMetadata(mediaConfig); return mediaConfig; } catch (e) { const category = getErrorCategory(e); @@ -207,6 +206,7 @@ export class KalturaPlayer extends FakeEventTarget { playerConfig.playback = playback; } this.configure({ ...playerConfig, sources }); + this._configureMediaMetadata(mediaConfig); } public async loadPlaylist(playlistInfo: ProviderPlaylistInfoObject, playlistConfig: PlaylistConfigObject): Promise { @@ -824,7 +824,7 @@ export class KalturaPlayer extends FakeEventTarget { return this._localPlayer.Error; } - private _configureMediaMetadata(mediaConfig: ProviderMediaConfigObject): void { + private _configureMediaMetadata(mediaConfig: KPMediaConfig): void { // here we can provide information about the media, to a device that is playing it // set the media metadata title to the name of the entry if (navigator.mediaSession) {