diff --git a/src/providers/live/live-provider.ts b/src/providers/live/live-provider.ts index 2877ee8..3f694e0 100644 --- a/src/providers/live/live-provider.ts +++ b/src/providers/live/live-provider.ts @@ -134,7 +134,7 @@ export class LiveProvider extends Provider { const newThumbCue = { ...newThumb, ...this._makeCuePointStartEndTime(newThumb.createdAt), - assetUrl: makeAssetUrl(this._player.config.provider.env?.serviceUrl, newThumb.assetId, this._player.config.session?.ks) + assetUrl: makeAssetUrl(this._player.provider.env.serviceUrl, newThumb.assetId, this._player.config.session?.ks) }; this._thumbCuePoints.push(newThumbCue); this._thumbCuePoints = this._fixCuePointEndTime(this._thumbCuePoints); diff --git a/src/providers/utils.ts b/src/providers/utils.ts index 96a90d8..51e0bbe 100644 --- a/src/providers/utils.ts +++ b/src/providers/utils.ts @@ -1,5 +1,3 @@ -export const DEFAULT_SERVICE_URL = '//cdnapisec.kaltura.com/api_v3'; - export function isEmptyObject(obj: Record) { return Object.keys(obj).length === 0 && obj.constructor === Object; } @@ -8,6 +6,6 @@ export function getDomainFromUrl(url: string) { return url.replace(/^(.*\/\/[^\/?#]*).*$/, '$1'); } -export function makeAssetUrl(serviceUrl: string = DEFAULT_SERVICE_URL, assetId: string, ks: string = '') { +export function makeAssetUrl(serviceUrl: string, assetId: string, ks: string = '') { return `${serviceUrl}/index.php/service/thumbAsset/action/serve/thumbAssetId/${assetId}/ks/${ks}`; } diff --git a/src/providers/vod/vod-provider.ts b/src/providers/vod/vod-provider.ts index 5fe8426..a2b9d72 100644 --- a/src/providers/vod/vod-provider.ts +++ b/src/providers/vod/vod-provider.ts @@ -115,7 +115,7 @@ export class VodProvider extends Provider { const createCuePointList = (thumbCuePoints: Array) => { return thumbCuePoints.map((thumbCuePoint: KalturaThumbCuePoint) => { return { - assetUrl: makeAssetUrl(this._player.config.provider.env?.serviceUrl, thumbCuePoint.assetId, this._player.config.session.ks), + assetUrl: makeAssetUrl(this._player.provider.env.serviceUrl, thumbCuePoint.assetId, this._player.config.session.ks), id: thumbCuePoint.id, cuePointType: thumbCuePoint.cuePointType, startTime: thumbCuePoint.startTime / 1000,