From 68b60614e463ff13dac4156a8407022f7b7eb46f Mon Sep 17 00:00:00 2001 From: lianbenjamin <79077248+lianbenjamin@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:44:09 +0300 Subject: [PATCH 1/3] fix(FEC-14071): thumbnail requests append height, width, ks too many times --- src/entities/media-entry.ts | 9 ++++++++- src/k-provider/ovp/provider-parser.ts | 1 + src/k-provider/ovp/provider.ts | 2 ++ src/k-provider/ovp/response-types/kaltura-media-entry.ts | 7 +++++++ src/types/media-config-sources.ts | 1 + src/types/media-entry.ts | 1 + 6 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/entities/media-entry.ts b/src/entities/media-entry.ts index 9dc88105..4f48422f 100644 --- a/src/entities/media-entry.ts +++ b/src/entities/media-entry.ts @@ -74,6 +74,12 @@ export default class MediaEntry { */ public downloadUrl?: string; + /** + * @member - The raw thumbnail URL + * @type {string} + */ + public rawThumbnailUrl?: string; + /** * @constructor */ @@ -99,7 +105,8 @@ export default class MediaEntry { type: this.type, poster: this.poster, assetReferenceType: this.assetReferenceType, - downloadUrl: this.downloadUrl + downloadUrl: this.downloadUrl, + rawThumbnailUrl: this.rawThumbnailUrl }; } } diff --git a/src/k-provider/ovp/provider-parser.ts b/src/k-provider/ovp/provider-parser.ts index 3caad4be..1701828d 100644 --- a/src/k-provider/ovp/provider-parser.ts +++ b/src/k-provider/ovp/provider-parser.ts @@ -153,6 +153,7 @@ class OVPProviderParser { private static _fillBaseData(mediaEntry: MediaEntry, entry: KalturaMediaEntry, metadataList?: KalturaMetadataListResponse, playbackContext?: any): MediaEntry { mediaEntry.poster = entry.poster; + mediaEntry.rawThumbnailUrl = entry.rawThumbnailUrl; mediaEntry.id = entry.id; mediaEntry.duration = entry.duration; mediaEntry.downloadUrl = entry.downloadUrl || ''; diff --git a/src/k-provider/ovp/provider.ts b/src/k-provider/ovp/provider.ts index 83ec045d..0edc6c20 100644 --- a/src/k-provider/ovp/provider.ts +++ b/src/k-provider/ovp/provider.ts @@ -326,6 +326,7 @@ export default class OVPProvider extends BaseProvider; downloadUrl?: string; + rawThumbnailUrl?: string; }; diff --git a/src/types/media-entry.ts b/src/types/media-entry.ts index 915bcca1..4be80783 100644 --- a/src/types/media-entry.ts +++ b/src/types/media-entry.ts @@ -13,4 +13,5 @@ export type ProviderMediaEntryObject = { poster?: string | Poster[]; downloadUrl?: string; assetReferenceType?: string; + rawThumbnailUrl?: string; }; From 22a27ffd58ae75c29233163af70be06243375992 Mon Sep 17 00:00:00 2001 From: lianbenjamin <79077248+lianbenjamin@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:59:42 +0300 Subject: [PATCH 2/3] fix mock data for tests --- test/src/k-provider/ovp/media-config-data.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/src/k-provider/ovp/media-config-data.js b/test/src/k-provider/ovp/media-config-data.js index 65b20171..0be5b3bc 100644 --- a/test/src/k-provider/ovp/media-config-data.js +++ b/test/src/k-provider/ovp/media-config-data.js @@ -13,6 +13,7 @@ const NoPluginsNoDrm = { vr: null, type: 'Vod', poster: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', + rawThumbnailUrl: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', metadata: { entryId: '1_rsrdfext', name: 'FO21934-HDTX-SWE', @@ -266,6 +267,7 @@ const RegexAppliedPlayManifestSources = { duration: 55, type: 'Vod', poster: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', + rawThumbnailUrl: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', dvr: false, vr: null, metadata: { @@ -412,6 +414,7 @@ const RegexAppliedAllSources = { type: 'Vod', poster: 'http://qa-kes-ebu-01.dev.kaltura.com/kAPI/kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', + rawThumbnailUrl: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', dvr: false, vr: null, metadata: { @@ -466,6 +469,7 @@ const NoPluginsWithDrm = { vr: null, type: 'Vod', poster: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', + rawThumbnailUrl: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', metadata: { entryId: '1_rwbj3j0a', name: 'DRM TEST', @@ -532,6 +536,7 @@ const WithPluginsNoDrm = { vr: null, type: 'Vod', poster: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', + rawThumbnailUrl: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', metadata: { entryId: '1_rsrdfext', name: 'FO21934-HDTX-SWE', @@ -677,6 +682,7 @@ const WithPluginsWithDrm = { vr: null, type: 'Vod', poster: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', + rawThumbnailUrl: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', metadata: { entryId: '1_rwbj3j0a', name: 'DRM TEST', @@ -742,6 +748,7 @@ const AudioEntryWithoutPlugins = { vr: null, type: 'Audio', poster: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', + rawThumbnailUrl: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', metadata: { entryId: '0_vyzw3ceu', name: 'TEST_WAESP_PLACINGTEST_DUAL', @@ -805,6 +812,7 @@ const ImageEntryWithoutPlugins = { vr: null, type: 'Image', poster: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', + rawThumbnailUrl: 'http://kaltura.com/p/1082342/sp/108234200/thumbnail/entry_id/1_rsrdfext/version/100002/width/640/height/360', metadata: { entryId: '0_84zz779s', name: 'Channel HU-TEST-STG-Attila-160203 Thumbnail', @@ -1175,6 +1183,7 @@ const EntryWithBumper = { duration: 741, type: 'Vod', poster: 'http://cdntesting.qa.mkaltura.com/p/1091/sp/109100/thumbnail/entry_id/0_wifqaipd/version/100042', + rawThumbnailUrl: 'http://cdntesting.qa.mkaltura.com/p/1091/sp/109100/thumbnail/entry_id/0_wifqaipd/version/100042', dvr: false, vr: null, metadata: { @@ -1293,6 +1302,7 @@ const EntryWithBumperWithKs = { duration: 741, type: 'Vod', poster: 'http://cdntesting.qa.mkaltura.com/p/1091/sp/109100/thumbnail/entry_id/0_wifqaipd/version/100042', + rawThumbnailUrl: 'http://cdntesting.qa.mkaltura.com/p/1091/sp/109100/thumbnail/entry_id/0_wifqaipd/version/100042', dvr: false, vr: null, metadata: { @@ -1414,6 +1424,7 @@ const EntryWithNoBumper = { duration: 741, type: 'Vod', poster: 'http://cdntesting.qa.mkaltura.com/p/1091/sp/109100/thumbnail/entry_id/0_wifqaipd/version/100042', + rawThumbnailUrl: 'http://cdntesting.qa.mkaltura.com/p/1091/sp/109100/thumbnail/entry_id/0_wifqaipd/version/100042', dvr: false, vr: null, metadata: { @@ -1507,6 +1518,7 @@ const EntryOfPartner0 = { duration: 11, type: 'Vod', poster: 'https://cfvod.kaltura.com/p/1645161/sp/164516100/thumbnail/entry_id/0_pi55vv3r/version/100002', + rawThumbnailUrl: 'https://cfvod.kaltura.com/p/1645161/sp/164516100/thumbnail/entry_id/0_pi55vv3r/version/100002', dvr: false, vr: null, metadata: { From cf2e92fca4dc645f061ec47ac4c1aa9eb8ee30db Mon Sep 17 00:00:00 2001 From: lianbenjamin <79077248+lianbenjamin@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:28:50 +0300 Subject: [PATCH 3/3] move thumbnailUrl initialization after poster --- src/k-provider/ovp/response-types/kaltura-media-entry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k-provider/ovp/response-types/kaltura-media-entry.ts b/src/k-provider/ovp/response-types/kaltura-media-entry.ts index f5043f51..e48b62ff 100644 --- a/src/k-provider/ovp/response-types/kaltura-media-entry.ts +++ b/src/k-provider/ovp/response-types/kaltura-media-entry.ts @@ -181,6 +181,7 @@ export class KalturaMediaEntry { this.flavorParamsIds = entry.flavorParamsIds; this.duration = entry.duration; this.poster = entry.thumbnailUrl; + this.rawThumbnailUrl = entry.thumbnailUrl; this.status = entry.status; this.dvrStatus = entry.dvrStatus; this.tags = entry.tags; @@ -191,6 +192,5 @@ export class KalturaMediaEntry { this.plays = entry.plays; this.views = entry.views; this.downloadUrl = entry.downloadUrl; - this.rawThumbnailUrl = entry.thumbnailUrl; } }