From 013aa2d345d982ba569457513d4388132376e317 Mon Sep 17 00:00:00 2001 From: SivanA-Kaltura <88330203+SivanA-Kaltura@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:02:55 +0200 Subject: [PATCH] handle seekFrom and clipTo from URL --- src/kaltura-player.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/kaltura-player.ts b/src/kaltura-player.ts index 0bc083456..5b5c2a5b5 100644 --- a/src/kaltura-player.ts +++ b/src/kaltura-player.ts @@ -162,9 +162,6 @@ export class KalturaPlayer extends FakeEventTarget { this.reset(); this._localPlayer.loadingMedia = true; this._uiWrapper.setLoadingSpinnerState(true); - // TODO update sources config types in provider - this.handleSourceTimeRangeUpdate((mediaOptions as any)?.seekFrom, (mediaOptions as any)?.clipTo); - try { const providerMediaConfig: ProviderMediaConfigObject = await this._provider.getMediaConfig(mediaInfo); const mediaConfig = Utils.Object.copyDeep(providerMediaConfig); @@ -271,6 +268,7 @@ export class KalturaPlayer extends FakeEventTarget { delete localPlayerConfig.plugins; if (localPlayerConfig.sources) { const { sources } = localPlayerConfig; + this.handleSourcesTimeRangeUpdate(sources.seekFrom, sources.clipTo); delete localPlayerConfig.sources; this._localPlayer.configure(localPlayerConfig); this._localPlayer.setSources(sources || {}); @@ -1207,7 +1205,7 @@ export class KalturaPlayer extends FakeEventTarget { return this._sessionIdCache; } - private handleSourceTimeRangeUpdate(seekFrom: number | undefined, clipTo: number | undefined): void { + private handleSourcesTimeRangeUpdate(seekFrom: number | undefined, clipTo: number | undefined): void { let ignoreManifestTextTracks = false; if (typeof seekFrom === 'number') {