@playkit-js/playkit-js-providers 2.41.0-canary.0-bb5f4a7 → 2.41.0-canary.0-fadaac0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/analytics-service/package.json +6 -0
  2. package/bookmark-service/package.json +6 -0
  3. package/dist/analytics-service.d.ts +160 -0
  4. package/dist/bookmark-service.d.ts +157 -0
  5. package/dist/ott-provider.d.ts +546 -0
  6. package/dist/{index.d.ts → ovp-provider.d.ts} +99 -120
  7. package/dist/playkit-analytics-service.js +1 -1
  8. package/dist/playkit-bookmark-service.js +1 -1
  9. package/dist/playkit-ott-provider.js +1 -1
  10. package/dist/playkit-ott-provider.js.map +1 -1
  11. package/dist/playkit-ovp-provider.js +1 -2
  12. package/dist/playkit-ovp-provider.js.map +1 -1
  13. package/dist/playkit-stats-service.js +1 -1
  14. package/dist/stats-service.d.ts +159 -0
  15. package/dist/tsdoc-metadata.json +1 -1
  16. package/dist/types.d.ts +393 -0
  17. package/ott-provider/package.json +6 -0
  18. package/ovp-provider/package.json +6 -0
  19. package/package.json +23 -15
  20. package/src/entities/media-entry.ts +8 -1
  21. package/src/k-provider/common/base-provider.ts +13 -2
  22. package/src/k-provider/ovp/loaders/media-entry-loader.ts +4 -4
  23. package/src/k-provider/ovp/provider-parser.ts +14 -2
  24. package/src/k-provider/ovp/provider.ts +9 -5
  25. package/src/k-provider/ovp/regex-action-handler.ts +51 -44
  26. package/src/k-provider/ovp/response-types/kaltura-flavor-asset.ts +17 -0
  27. package/src/k-provider/ovp/response-types/kaltura-media-entry.ts +7 -0
  28. package/src/k-provider/ovp/services/base-entry-service.ts +4 -1
  29. package/src/types/index.ts +0 -8
  30. package/src/types/media-config-sources.ts +1 -0
  31. package/src/types/media-entry.ts +1 -0
  32. package/src/types/provider-options.ts +1 -0
  33. package/src/util/object.ts +10 -0
  34. package/stats-service/package.json +6 -0
  35. package/types/package.json +5 -0
  36. package/dist/playkit-ovp-provider.js.LICENSE.txt +0 -1
  37. package/playkit-analytics-service/package.json +0 -5
  38. package/playkit-bookmark-service/package.json +0 -5
  39. package/playkit-ott-provider/package.json +0 -5
  40. package/playkit-ovp-provider/package.json +0 -5
  41. package/playkit-stats-service/package.json +0 -5
@@ -1,11 +1,11 @@
1
- export declare type AdapterDataConfig = {
1
+ declare type AdapterDataConfig = {
2
2
  [key: string]: {
3
3
  value: string;
4
4
  objectType?: string;
5
5
  };
6
6
  };
7
7
 
8
- export declare class BaseProvider<MI> {
8
+ declare class BaseProvider<MI> {
9
9
  private _partnerId;
10
10
  private _widgetId?;
11
11
  private _ks;
@@ -13,6 +13,7 @@ export declare class BaseProvider<MI> {
13
13
  _dataLoader: DataLoaderManager;
14
14
  private _playerVersion;
15
15
  _logger: any;
16
+ _referrer?: string;
16
17
  protected _isAnonymous: boolean;
17
18
  _networkRetryConfig: ProviderNetworkRetryParameters;
18
19
  get partnerId(): number;
@@ -51,14 +52,6 @@ declare class Bumper {
51
52
  constructor(data: any);
52
53
  }
53
54
 
54
- export declare type CaptionType = {
55
- [type: string]: string;
56
- };
57
-
58
- export declare const ContextType: {
59
- [type: string]: string;
60
- };
61
-
62
55
  declare class DataLoaderManager {
63
56
  /**
64
57
  * @member - Loaders response map index
@@ -177,7 +170,7 @@ declare class EntryList {
177
170
  constructor();
178
171
  }
179
172
 
180
- export declare interface ILoader {
173
+ declare interface ILoader {
181
174
  requests: Array<RequestBuilder>;
182
175
  response: any;
183
176
  isValid(): boolean;
@@ -208,8 +201,6 @@ declare class ImageSource {
208
201
  static extractBaseThumbnailUrl(url: string): string;
209
202
  }
210
203
 
211
- export declare type IProvider = OTTProvider | OVPProvider;
212
-
213
204
  declare class KalturaAccessControlMessage {
214
205
  /**
215
206
  * @member - The access control message
@@ -393,6 +384,18 @@ declare class KalturaFlavorAsset {
393
384
  * @type {string}
394
385
  */
395
386
  label: string;
387
+ /**
388
+ * @member - tags
389
+ * @type {Array<string>}
390
+ */
391
+ tags: Array<string>;
392
+ /**
393
+ * @function
394
+ * @param {string} tags The tags
395
+ * @returns {Array<string>} tags array
396
+ * @static
397
+ */
398
+ static parseTags(tags?: string): Array<string>;
396
399
  /**
397
400
  * @constructor
398
401
  * @param {Object} data The json response
@@ -535,6 +538,11 @@ declare class KalturaMediaEntry {
535
538
  * @type {string}
536
539
  */
537
540
  creatorId: string;
541
+ /**
542
+ * @member - The raw thumbnail URL
543
+ * @type {string}
544
+ */
545
+ rawThumbnailUrl: string;
538
546
  /**
539
547
  * @constructor
540
548
  * @param {Object} entry The json response
@@ -922,6 +930,11 @@ declare class MediaEntry {
922
930
  * @type {string}
923
931
  */
924
932
  downloadUrl?: string;
933
+ /**
934
+ * @member - The raw thumbnail URL
935
+ * @type {string}
936
+ */
937
+ rawThumbnailUrl?: string;
925
938
  /**
926
939
  * @constructor
927
940
  */
@@ -1021,10 +1034,6 @@ declare class MediaSources {
1021
1034
  toJSON(): ProviderMediaSourcesObject;
1022
1035
  }
1023
1036
 
1024
- export declare const MediaType: {
1025
- [type: string]: string;
1026
- };
1027
-
1028
1037
  declare class MultiRequestBuilder extends RequestBuilder {
1029
1038
  private static _logger;
1030
1039
  /**
@@ -1068,35 +1077,9 @@ declare class MultiRequestResult {
1068
1077
  constructor(response: any, requestsMustSucceed?: boolean);
1069
1078
  }
1070
1079
 
1071
- declare class OTTProvider extends BaseProvider<OTTProviderMediaInfoObject> {
1072
- /**
1073
- * @constructor
1074
- * @param {ProviderOptionsObject} options - provider options
1075
- * @param {string} playerVersion - player version
1076
- */
1077
- constructor(options: ProviderOptionsObject, playerVersion: string);
1078
- get env(): any;
1079
- /**
1080
- * Gets the backend media config.
1081
- * @param {OTTProviderMediaInfoObject} mediaInfo - ott media info
1082
- * @returns {Promise<ProviderMediaConfigObject>} - The provider media config
1083
- */
1084
- getMediaConfig(mediaInfo: OTTProviderMediaInfoObject): Promise<ProviderMediaConfigObject>;
1085
- private _parseDataFromResponse;
1086
- /**
1087
- * Gets the playlist config from entry list.
1088
- * @param {ProviderEntryListObject} entryListInfo - ott entry list info
1089
- * @returns {Promise<ProviderPlaylistObject>} - The provider playlist config
1090
- */
1091
- getEntryListConfig(entryListInfo: ProviderEntryListObject): Promise<ProviderPlaylistObject>;
1092
- private _parseEntryListDataFromResponse;
1093
- private _getDefaultSourcesObject;
1094
- private _getSourcesObject;
1095
- }
1096
- export { OTTProvider }
1097
- export { OTTProvider as Provider }
1080
+ export declare const NAME: string;
1098
1081
 
1099
- export declare type OTTProviderMediaInfoObject = OVPProviderMediaInfoObject & {
1082
+ declare type OTTProviderMediaInfoObject = OVPProviderMediaInfoObject & {
1100
1083
  mediaType: string;
1101
1084
  contextType: string;
1102
1085
  protocol?: string;
@@ -1114,57 +1097,13 @@ declare type OVPMediaEntryLoaderResponse = {
1114
1097
  metadataListResult: KalturaMetadataListResponse;
1115
1098
  };
1116
1099
 
1117
- export declare class OVPProvider extends BaseProvider<OVPProviderMediaInfoObject> {
1118
- private _filterOptionsConfig;
1119
- /**
1120
- * @constructor
1121
- * @param {ProviderOptionsObject} options - provider options
1122
- * @param {string} playerVersion - player version
1123
- */
1124
- constructor(options: ProviderOptionsObject, playerVersion: string);
1125
- get env(): any;
1126
- /**
1127
- * Gets the backend media config object.
1128
- * @param {OVPProviderMediaInfoObject} mediaInfo - ovp media info
1129
- * @returns {Promise<ProviderMediaConfigObject>} - The provider media config
1130
- */
1131
- getMediaConfig(mediaInfo: OVPProviderMediaInfoObject): Promise<ProviderMediaConfigObject>;
1132
- doRequest(loaders: Array<RequestLoader>, ks?: string): Promise<any>;
1133
- private _getEntryRedirectFilter;
1134
- private _setFilterOptionsConfig;
1135
- private _parseDataFromResponse;
1136
- /**
1137
- * Checks if media is ready for playback (not being imported or converted)
1138
- * @param {MediaEntry} mediaEntry - the media entry info
1139
- * @returns {void}
1140
- */
1141
- private _verifyMediaStatus;
1142
- /**
1143
- * Gets the backend playlist config.
1144
- * @param {ProviderPlaylistInfoObject} playlistInfo - ovp playlist info
1145
- * @returns {Promise<ProviderPlaylistObject>} - The provider playlist config
1146
- */
1147
- getPlaylistConfig(playlistInfo: ProviderPlaylistInfoObject): Promise<ProviderPlaylistObject>;
1148
- private _parsePlaylistDataFromResponse;
1149
- /**
1150
- * Gets playlist config from entry list.
1151
- * @param {ProviderEntryListObject} entryListInfo - ovp entry list info
1152
- * @returns {Promise<ProviderPlaylistObject>} - The provider playlist config
1153
- */
1154
- getEntryListConfig(entryListInfo: ProviderEntryListObject): Promise<ProviderPlaylistObject>;
1155
- private _parseEntryListDataFromResponse;
1156
- private _getPlaylistObject;
1157
- private _getDefaultSourcesObject;
1158
- private _getSourcesObject;
1159
- }
1160
-
1161
- export declare type OVPProviderMediaInfoObject = {
1100
+ declare type OVPProviderMediaInfoObject = {
1162
1101
  entryId?: string;
1163
1102
  referenceId?: string;
1164
1103
  ks?: string;
1165
1104
  };
1166
1105
 
1167
- export declare type PKExternalCaptionObject = {
1106
+ declare type PKExternalCaptionObject = {
1168
1107
  url: string;
1169
1108
  label: string;
1170
1109
  language: string;
@@ -1206,24 +1145,68 @@ declare class Playlist {
1206
1145
  constructor();
1207
1146
  }
1208
1147
 
1209
- export declare interface Poster {
1148
+ declare interface Poster {
1210
1149
  width: number;
1211
1150
  height: number;
1212
1151
  url: string;
1213
1152
  }
1214
1153
 
1215
- export declare type ProviderDrmDataObject = {
1154
+ export declare class Provider extends BaseProvider<OVPProviderMediaInfoObject> {
1155
+ private _filterOptionsConfig;
1156
+ /**
1157
+ * @constructor
1158
+ * @param {ProviderOptionsObject} options - provider options
1159
+ * @param {string} playerVersion - player version
1160
+ */
1161
+ constructor(options: ProviderOptionsObject, playerVersion: string);
1162
+ get env(): any;
1163
+ /**
1164
+ * Gets the backend media config object.
1165
+ * @param {OVPProviderMediaInfoObject} mediaInfo - ovp media info
1166
+ * @returns {Promise<ProviderMediaConfigObject>} - The provider media config
1167
+ */
1168
+ getMediaConfig(mediaInfo: OVPProviderMediaInfoObject): Promise<ProviderMediaConfigObject>;
1169
+ doRequest(loaders: Array<RequestLoader>, ks?: string, requestsMustSucceed?: boolean): Promise<any>;
1170
+ private _getEntryRedirectFilter;
1171
+ private _setFilterOptionsConfig;
1172
+ private _parseDataFromResponse;
1173
+ /**
1174
+ * Checks if media is ready for playback (not being imported or converted)
1175
+ * @param {MediaEntry} mediaEntry - the media entry info
1176
+ * @returns {void}
1177
+ */
1178
+ private _verifyMediaStatus;
1179
+ /**
1180
+ * Gets the backend playlist config.
1181
+ * @param {ProviderPlaylistInfoObject} playlistInfo - ovp playlist info
1182
+ * @returns {Promise<ProviderPlaylistObject>} - The provider playlist config
1183
+ */
1184
+ getPlaylistConfig(playlistInfo: ProviderPlaylistInfoObject): Promise<ProviderPlaylistObject>;
1185
+ private _parsePlaylistDataFromResponse;
1186
+ /**
1187
+ * Gets playlist config from entry list.
1188
+ * @param {ProviderEntryListObject} entryListInfo - ovp entry list info
1189
+ * @returns {Promise<ProviderPlaylistObject>} - The provider playlist config
1190
+ */
1191
+ getEntryListConfig(entryListInfo: ProviderEntryListObject): Promise<ProviderPlaylistObject>;
1192
+ private _parseEntryListDataFromResponse;
1193
+ private _getPlaylistObject;
1194
+ private _getDefaultSourcesObject;
1195
+ private _getSourcesObject;
1196
+ }
1197
+
1198
+ declare type ProviderDrmDataObject = {
1216
1199
  licenseUrl: string;
1217
1200
  scheme: string;
1218
1201
  certificate?: string;
1219
1202
  };
1220
1203
 
1221
- export declare type ProviderEntryListObject = {
1204
+ declare type ProviderEntryListObject = {
1222
1205
  entries: Array<ProviderMediaInfoObject>;
1223
1206
  ks?: string;
1224
1207
  };
1225
1208
 
1226
- export declare type ProviderEnvConfigObject = {
1209
+ declare type ProviderEnvConfigObject = {
1227
1210
  serviceUrl: string;
1228
1211
  cdnUrl?: string;
1229
1212
  analyticsServiceUrl?: string;
@@ -1231,11 +1214,11 @@ export declare type ProviderEnvConfigObject = {
1231
1214
  replaceHostOnlyManifestUrls?: boolean;
1232
1215
  };
1233
1216
 
1234
- export declare type ProviderFilterOptionsObject = {
1217
+ declare type ProviderFilterOptionsObject = {
1235
1218
  redirectFromEntryId?: boolean;
1236
1219
  };
1237
1220
 
1238
- export declare type ProviderMediaConfigMetadataObject = {
1221
+ declare type ProviderMediaConfigMetadataObject = {
1239
1222
  name: string;
1240
1223
  description?: string;
1241
1224
  mediaType?: string;
@@ -1249,7 +1232,7 @@ export declare type ProviderMediaConfigMetadataObject = {
1249
1232
  views?: number;
1250
1233
  };
1251
1234
 
1252
- export declare type ProviderMediaConfigObject = {
1235
+ declare type ProviderMediaConfigObject = {
1253
1236
  session: ProviderMediaConfigSessionObject;
1254
1237
  sources: ProviderMediaConfigSourcesObject;
1255
1238
  plugins: {
@@ -1257,14 +1240,14 @@ export declare type ProviderMediaConfigObject = {
1257
1240
  };
1258
1241
  };
1259
1242
 
1260
- export declare type ProviderMediaConfigSessionObject = {
1243
+ declare type ProviderMediaConfigSessionObject = {
1261
1244
  partnerId: number;
1262
1245
  uiConfId?: number;
1263
1246
  ks?: string;
1264
1247
  isAnonymous?: boolean;
1265
1248
  };
1266
1249
 
1267
- export declare type ProviderMediaConfigSourcesObject = {
1250
+ declare type ProviderMediaConfigSourcesObject = {
1268
1251
  dash: Array<ProviderMediaSourceObject>;
1269
1252
  hls: Array<ProviderMediaSourceObject>;
1270
1253
  progressive: Array<ProviderMediaSourceObject>;
@@ -1279,9 +1262,10 @@ export declare type ProviderMediaConfigSourcesObject = {
1279
1262
  metadata: ProviderMediaConfigMetadataObject;
1280
1263
  captions?: Array<PKExternalCaptionObject>;
1281
1264
  downloadUrl?: string;
1265
+ rawThumbnailUrl?: string;
1282
1266
  };
1283
1267
 
1284
- export declare type ProviderMediaEntryObject = {
1268
+ declare type ProviderMediaEntryObject = {
1285
1269
  id?: string;
1286
1270
  name?: string;
1287
1271
  sources: ProviderMediaSourcesObject;
@@ -1293,17 +1277,18 @@ export declare type ProviderMediaEntryObject = {
1293
1277
  poster?: string | Poster[];
1294
1278
  downloadUrl?: string;
1295
1279
  assetReferenceType?: string;
1280
+ rawThumbnailUrl?: string;
1296
1281
  };
1297
1282
 
1298
- export declare type ProviderMediaFormatType = {
1283
+ declare type ProviderMediaFormatType = {
1299
1284
  name: string;
1300
1285
  mimeType: string;
1301
1286
  pathExt: string;
1302
1287
  };
1303
1288
 
1304
- export declare type ProviderMediaInfoObject = OVPProviderMediaInfoObject | OTTProviderMediaInfoObject;
1289
+ declare type ProviderMediaInfoObject = OVPProviderMediaInfoObject | OTTProviderMediaInfoObject;
1305
1290
 
1306
- export declare type ProviderMediaSourceObject = {
1291
+ declare type ProviderMediaSourceObject = {
1307
1292
  id: string;
1308
1293
  url: string;
1309
1294
  mimetype: string;
@@ -1314,7 +1299,7 @@ export declare type ProviderMediaSourceObject = {
1314
1299
  drmData?: Array<ProviderDrmDataObject>;
1315
1300
  };
1316
1301
 
1317
- export declare type ProviderMediaSourcesObject = {
1302
+ declare type ProviderMediaSourcesObject = {
1318
1303
  progressive: Array<ProviderMediaSourceObject>;
1319
1304
  dash: Array<ProviderMediaSourceObject>;
1320
1305
  hls: Array<ProviderMediaSourceObject>;
@@ -1323,13 +1308,13 @@ export declare type ProviderMediaSourcesObject = {
1323
1308
  captions?: Array<PKExternalCaptionObject>;
1324
1309
  };
1325
1310
 
1326
- export declare type ProviderNetworkRetryParameters = {
1311
+ declare type ProviderNetworkRetryParameters = {
1327
1312
  async: boolean;
1328
1313
  timeout?: number;
1329
1314
  maxAttempts?: number;
1330
1315
  };
1331
1316
 
1332
- export declare type ProviderOptionsObject = {
1317
+ declare type ProviderOptionsObject = {
1333
1318
  partnerId: number;
1334
1319
  widgetId?: string;
1335
1320
  logger?: LoggerType;
@@ -1340,6 +1325,7 @@ export declare type ProviderOptionsObject = {
1340
1325
  filterOptions?: ProviderFilterOptionsObject;
1341
1326
  ignoreServerConfig?: boolean;
1342
1327
  loadThumbnailWithKs?: boolean;
1328
+ referrer?: string;
1343
1329
  };
1344
1330
 
1345
1331
  export declare class ProviderParser {
@@ -1461,16 +1447,7 @@ export declare class ProviderParser {
1461
1447
  static getErrorMessages(response: OVPMediaEntryLoaderResponse): Array<KalturaAccessControlMessage>;
1462
1448
  }
1463
1449
 
1464
- export declare type ProviderPlaybackContextOptions = {
1465
- mediaProtocol?: string;
1466
- assetFileIds?: string;
1467
- context?: string;
1468
- streamerType?: string;
1469
- urlType?: string;
1470
- adapterData?: AdapterDataConfig;
1471
- };
1472
-
1473
- export declare type ProviderPlaylistInfoObject = {
1450
+ declare type ProviderPlaylistInfoObject = {
1474
1451
  playlistId: string;
1475
1452
  ks?: string;
1476
1453
  };
@@ -1479,12 +1456,12 @@ declare type ProviderPlaylistItemObject = {
1479
1456
  sources: ProviderMediaConfigSourcesObject;
1480
1457
  };
1481
1458
 
1482
- export declare type ProviderPlaylistMetadataObject = {
1459
+ declare type ProviderPlaylistMetadataObject = {
1483
1460
  name: string;
1484
1461
  description: string;
1485
1462
  };
1486
1463
 
1487
- export declare type ProviderPlaylistObject = {
1464
+ declare type ProviderPlaylistObject = {
1488
1465
  id: string;
1489
1466
  metadata: ProviderPlaylistMetadataObject;
1490
1467
  poster: string;
@@ -1577,7 +1554,7 @@ export declare class RequestBuilder {
1577
1554
  private _createError;
1578
1555
  }
1579
1556
 
1580
- export declare type RequestLoader = {
1557
+ declare type RequestLoader = {
1581
1558
  loader: ILoader;
1582
1559
  params: any;
1583
1560
  };
@@ -1648,4 +1625,6 @@ declare class ServiceResult {
1648
1625
  constructor(response: any);
1649
1626
  }
1650
1627
 
1628
+ export declare const VERSION: string;
1629
+
1651
1630
  export { }
@@ -1,2 +1,2 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function s(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}e.r(t),e.d(t,{NAME:function(){return P},OVPAnalyticsService:function(){return A},OVPConfiguration:function(){return h},RequestBuilder:function(){return l},VERSION:function(){return C}});var u=function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}};var c=function(e){return u(e)},f=s((function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,e),this.severity=t,this.category=n,this.code=o,this.data=i,e._logger.error("Category:".concat(n," | Code:").concat(o," |"),i)}));a(f,"Severity",{RECOVERABLE:1,CRITICAL:2}),a(f,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),a(f,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),a(f,"_logger",c("Error"));var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;r(this,e),a(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),a(this,"_attemptCounter",1),this.headers=t}return s(e,[{key:"getUrl",value:function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var e=this,t=new Promise((function(t,r){e._requestPromise={resolve:t,reject:r}}));return this.url||this._requestPromise.reject(new f(f.Severity.CRITICAL,f.Category.NETWORK,f.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t}},{key:"_createXHR",value:function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var r=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(r)}catch(r){e._requestPromise.reject(e._createError(t,f.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var r=performance.now();t.ontimeout=function(){e._handleError(t,f.Code.TIMEOUT,{timeout:(performance.now()-r)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,f.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,r){t.setRequestHeader(r,e)})),t.send(this.params)}},{key:"_getResponseHeaders",value:function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))}},{key:"_handleError",value:function(e,t,r){var n=this._createError(e,t,r);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(n);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(e,t,r){return Object.assign(r,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new f(f.Severity.CRITICAL,f.Category.NETWORK,t,r)}}]),e}(),p=function e(t){var r;return Array.isArray(t)?(r=t.length>0?t.slice(0):[]).forEach((function(t,o){("object"===n(t)||Array.isArray(t)&&t.length>0)&&(r[o]=e(t))})):"object"===n(t)?(r=Object.assign({},t),Object.keys(r).forEach((function(t){("object"===n(r[t])||Array.isArray(r[t])&&r[t].length>0)&&(r[t]=e(r[t]))}))):r=t,r},y={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},h=function(){function e(){r(this,e)}return s(e,null,[{key:"set",value:function(e){e&&Object.assign(y,e)}},{key:"get",value:function(){return p(y)}}]),e}();function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var R=s((function e(t){r(this,e),a(this,"hasError",!1),"KalturaAPIException"===t.objectType?(this.hasError=!0,this.error=new O(t.code,t.message)):t.error&&"KalturaAPIException"===t.error.objectType?(this.hasError=!0,this.error=new O(t.error.code,t.error.message)):this.data=t})),O=s((function e(t,n){r(this,e),this.code=t,this.message=n}));var b=function(e){d(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=E(t);if(n){var o=E(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function i(){var e;r(this,i);for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return a(m(e=o.call.apply(o,[this].concat(n))),"requests",[]),e}return s(i,[{key:"add",value:function(e){this.requests.push(e);var t={},r={service:e.service,action:e.action};return Object.assign(t,a({},this.requests.length,Object.assign(r,e.params))),Object.assign(t,this.params),this.params=t,this}},{key:"execute",value:function(e){var t=this;return new Promise((function(r,n){try{t.params=JSON.stringify(t.params)}catch(e){i._logger.error("".concat(e.message)),n(new f(f.Severity.CRITICAL,f.Category.PROVIDER,f.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(o){var i=new _(o,e);i.success?r({headers:t.responseHeaders,response:i}):n(new f(f.Severity.CRITICAL,f.Category.NETWORK,f.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:i.results}))}),(function(e){n(e)}))}))}}]),i}(l);a(b,"_logger",c("MultiRequestBuilder"));var _=s((function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r(this,e),a(this,"results",[]);var o=t.result?t.result:t,i=(Array.isArray(o)?o:[o]).map((function(e){return new R(e)})),s=i.filter((function(e){return e.hasError}));s.forEach((function(t){e._logger.error("Service returned an error with error code: ".concat(t.error.code," and message: ").concat(t.error.message,"."))})),this.results=i,n&&s.length||s.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)}));a(_,"_logger",c("MultiRequestResult"));var T=function(e){var t=[],r=/\[\]$/,o=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e,r){r="function"==typeof r?r():null==r?"":r,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(r)};return function e(s,a){var u,c,f;if(s)if(o(a))for(u=0,c=a.length;u<c;u++)r.test(s)?i(s,a[u]):e(s+":"+("object"===n(a[u])?u:""),a[u]);else if(a&&"[object Object]"===String(a))for(f in a)e(s+":"+f,a[f]);else i(s,a);else if(o(a))for(u=0,c=a.length;u<c;u++)i(a[u].name,a[u].value);else for(f in a)e(f,a[f]);return t}("",e).join("&").replace(/%20/g,"+")};var S="analytics",A=function(e){d(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=E(t);if(n){var o=E(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function i(){return r(this,i),o.apply(this,arguments)}return s(i,null,[{key:"trackEvent",value:function(e,t,r){return"POST"===r?i._trackEventByPOST(e,t):i._trackEventByGET(e,t)}},{key:"_trackEventByGET",value:function(e,t){var r=h.get(),n={};Object.assign(n,r.serviceParams,t);var o=new l;return o.service=S,o.action="trackEvent",o.method="GET",o.retryConfig.maxAttempts=1,o.tag="analytics-trackEvent",o.params=n,o.url=e+"?service="+o.service+"&action="+o.action+"&"+T(o.params),o}},{key:"_trackEventByPOST",value:function(e,t){var r=h.get(),n={};Object.assign(n,r.serviceParams,t);var o=new Map;o.set("Content-Type","application/json");var i=new l(o),s={eventType:n.eventType,partnerId:n.partnerId,entryId:n.entryId,sessionId:n.sessionId};return["eventType","partnerId","entryId","sessionId"].forEach((function(e){return delete n[e]})),i.service=S,i.action="trackEvent",i.method="POST",i.retryConfig.maxAttempts=1,i.tag="analytics-trackEvent",i.params=JSON.stringify(n),i.url=e+"?service="+i.service+"&action="+i.action+"&"+T(s),i}}]),i}(function(){function e(){r(this,e)}return s(e,null,[{key:"getMultiRequest",value:function(e,t,r){var n=h.get(),o=n.serviceParams;Object.assign(o,{ks:t,clientTag:"html5:v"+e}),r&&Object.assign(o,{partnerId:r});var i=new Map;i.set("Content-Type","application/json");var s=new b(i);return s.method="POST",s.service="multirequest",s.url=s.getUrl(n.serviceUrl),s.params=o,s}}]),e}()),P="@playkit-js/playkit-js-providers-analytics-service",C="2.41.0-canary.0-bb5f4a7";return t}()}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}e.r(t),e.d(t,{NAME:function(){return P},OVPAnalyticsService:function(){return A},OVPConfiguration:function(){return h},RequestBuilder:function(){return l},VERSION:function(){return C}});var c=function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}};var u=function(e){return c(e)},f=a((function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,e),this.severity=t,this.category=n,this.code=o,this.data=i,e._logger.error("Category:".concat(n," | Code:").concat(o," |"),i)}));s(f,"Severity",{RECOVERABLE:1,CRITICAL:2}),s(f,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),s(f,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),s(f,"_logger",u("Error"));var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;r(this,e),s(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),s(this,"_attemptCounter",1),this.headers=t}return a(e,[{key:"getUrl",value:function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var e=this,t=new Promise((function(t,r){e._requestPromise={resolve:t,reject:r}}));return this.url||this._requestPromise.reject(new f(f.Severity.CRITICAL,f.Category.NETWORK,f.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t}},{key:"_createXHR",value:function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var r=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(r)}catch(r){e._requestPromise.reject(e._createError(t,f.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var r=performance.now();t.ontimeout=function(){e._handleError(t,f.Code.TIMEOUT,{timeout:(performance.now()-r)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,f.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,r){t.setRequestHeader(r,e)})),t.send(this.params)}},{key:"_getResponseHeaders",value:function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))}},{key:"_handleError",value:function(e,t,r){var n=this._createError(e,t,r);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(n);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(e,t,r){return Object.assign(r,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new f(f.Severity.CRITICAL,f.Category.NETWORK,t,r)}}]),e}(),p=function e(t){var r;return Array.isArray(t)?(r=t.length>0?t.slice(0):[]).forEach((function(t,o){("object"===n(t)||Array.isArray(t)&&t.length>0)&&(r[o]=e(t))})):"object"===n(t)?(r=Object.assign({},t),Object.keys(r).forEach((function(t){("object"===n(r[t])||Array.isArray(r[t])&&r[t].length>0)&&(r[t]=e(r[t]))}))):r=t,r},y={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},h=function(){function e(){r(this,e)}return a(e,null,[{key:"set",value:function(e){e&&Object.assign(y,e)}},{key:"get",value:function(){return p(y)}}]),e}();function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var R=a((function e(t){r(this,e),s(this,"hasError",!1),"KalturaAPIException"===t.objectType?(this.hasError=!0,this.error=new O(t.code,t.message)):t.error&&"KalturaAPIException"===t.error.objectType?(this.hasError=!0,this.error=new O(t.error.code,t.error.message)):this.data=t})),O=a((function e(t,n){r(this,e),this.code=t,this.message=n}));var b=function(e){d(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=E(t);if(n){var o=E(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function i(){var e;r(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return s(m(e=o.call.apply(o,[this].concat(n))),"requests",[]),e}return a(i,[{key:"add",value:function(e){this.requests.push(e);var t={},r={service:e.service,action:e.action};return Object.assign(t,s({},this.requests.length,Object.assign(r,e.params))),Object.assign(t,this.params),this.params=t,this}},{key:"execute",value:function(e){var t=this;return new Promise((function(r,n){try{t.params=JSON.stringify(t.params)}catch(e){i._logger.error("".concat(e.message)),n(new f(f.Severity.CRITICAL,f.Category.PROVIDER,f.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(o){var i=new _(o,e);i.success?r({headers:t.responseHeaders,response:i}):n(new f(f.Severity.CRITICAL,f.Category.NETWORK,f.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:i.results}))}),(function(e){n(e)}))}))}}]),i}(l);s(b,"_logger",u("MultiRequestBuilder"));var _=a((function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r(this,e),s(this,"results",[]);var o=t.result?t.result:t,i=(Array.isArray(o)?o:[o]).map((function(e){return new R(e)})),a=i.filter((function(e){return e.hasError}));a.forEach((function(t){e._logger.error("Service returned an error with error code: ".concat(t.error.code," and message: ").concat(t.error.message,"."))})),this.results=i,n&&a.length||a.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)}));s(_,"_logger",u("MultiRequestResult"));var T=function(e){var t=[],r=/\[\]$/,o=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e,r){r="function"==typeof r?r():null==r?"":r,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(r)};return function e(a,s){var c,u,f;if(a)if(o(s))for(c=0,u=s.length;c<u;c++)r.test(a)?i(a,s[c]):e(a+":"+("object"===n(s[c])?c:""),s[c]);else if(s&&"[object Object]"===String(s))for(f in s)e(a+":"+f,s[f]);else i(a,s);else if(o(s))for(c=0,u=s.length;c<u;c++)i(s[c].name,s[c].value);else for(f in s)e(f,s[f]);return t}("",e).join("&").replace(/%20/g,"+")};var S="analytics",A=function(e){d(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=E(t);if(n){var o=E(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function i(){return r(this,i),o.apply(this,arguments)}return a(i,null,[{key:"trackEvent",value:function(e,t,r){return"POST"===r?i._trackEventByPOST(e,t):i._trackEventByGET(e,t)}},{key:"_trackEventByGET",value:function(e,t){var r=h.get(),n={};Object.assign(n,r.serviceParams,t);var o=new l;return o.service=S,o.action="trackEvent",o.method="GET",o.retryConfig.maxAttempts=1,o.tag="analytics-trackEvent",o.params=n,o.url=e+"?service="+o.service+"&action="+o.action+"&"+T(o.params),o}},{key:"_trackEventByPOST",value:function(e,t){var r=h.get(),n={};Object.assign(n,r.serviceParams,t);var o=new Map;o.set("Content-Type","application/json");var i=new l(o),a={eventType:n.eventType,partnerId:n.partnerId,entryId:n.entryId,sessionId:n.sessionId};return["eventType","partnerId","entryId","sessionId"].forEach((function(e){return delete n[e]})),i.service=S,i.action="trackEvent",i.method="POST",i.retryConfig.maxAttempts=1,i.tag="analytics-trackEvent",i.params=JSON.stringify(n),i.url=e+"?service="+i.service+"&action="+i.action+"&"+T(a),i}}]),i}(function(){function e(){r(this,e)}return a(e,null,[{key:"getMultiRequest",value:function(e,t,r){var n=h.get(),o=n.serviceParams;Object.assign(o,{ks:t,clientTag:"html5:v"+e}),r&&Object.assign(o,{partnerId:r});var i=new Map;i.set("Content-Type","application/json");var a=new b(i);return a.method="POST",a.service="multirequest",a.url=a.getUrl(n.serviceUrl),a.params=o,a}}]),e}()),P="@playkit-js/playkit-js-providers-analytics-service",C="2.41.0-canary.0-fadaac0";return t}()}));
2
2
  //# sourceMappingURL=playkit-analytics-service.js.map
@@ -1,2 +1,2 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}e.r(t),e.d(t,{NAME:function(){return S},OTTBookmarkService:function(){return T},OTTConfiguration:function(){return h},RequestBuilder:function(){return l},VERSION:function(){return A}});var u=function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}};var c=function(e){return u(e)},f=a((function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,e),this.severity=t,this.category=n,this.code=o,this.data=i,e._logger.error("Category:".concat(n," | Code:").concat(o," |"),i)}));s(f,"Severity",{RECOVERABLE:1,CRITICAL:2}),s(f,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),s(f,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),s(f,"_logger",c("Error"));var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;r(this,e),s(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),s(this,"_attemptCounter",1),this.headers=t}return a(e,[{key:"getUrl",value:function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var e=this,t=new Promise((function(t,r){e._requestPromise={resolve:t,reject:r}}));return this.url||this._requestPromise.reject(new f(f.Severity.CRITICAL,f.Category.NETWORK,f.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t}},{key:"_createXHR",value:function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var r=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(r)}catch(r){e._requestPromise.reject(e._createError(t,f.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var r=performance.now();t.ontimeout=function(){e._handleError(t,f.Code.TIMEOUT,{timeout:(performance.now()-r)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,f.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,r){t.setRequestHeader(r,e)})),t.send(this.params)}},{key:"_getResponseHeaders",value:function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))}},{key:"_handleError",value:function(e,t,r){var n=this._createError(e,t,r);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(n);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(e,t,r){return Object.assign(r,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new f(f.Severity.CRITICAL,f.Category.NETWORK,t,r)}}]),e}(),p=function e(t){var r;return Array.isArray(t)?(r=t.length>0?t.slice(0):[]).forEach((function(t,o){("object"===n(t)||Array.isArray(t)&&t.length>0)&&(r[o]=e(t))})):"object"===n(t)?(r=Object.assign({},t),Object.keys(r).forEach((function(t){("object"===n(r[t])||Array.isArray(r[t])&&r[t].length>0)&&(r[t]=e(r[t]))}))):r=t,r},y={serviceParams:{apiVersion:"7.8.1"}},h=function(){function e(){r(this,e)}return a(e,null,[{key:"set",value:function(e){e&&Object.assign(y,e)}},{key:"get",value:function(){return p(y)}}]),e}();function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var E=a((function e(t){r(this,e),s(this,"hasError",!1),"KalturaAPIException"===t.objectType?(this.hasError=!0,this.error=new b(t.code,t.message)):t.error&&"KalturaAPIException"===t.error.objectType?(this.hasError=!0,this.error=new b(t.error.code,t.error.message)):this.data=t})),b=a((function e(t,n){r(this,e),this.code=t,this.message=n}));var O=function(e){d(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=R(t);if(n){var o=R(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function i(){var e;r(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return s(m(e=o.call.apply(o,[this].concat(n))),"requests",[]),e}return a(i,[{key:"add",value:function(e){this.requests.push(e);var t={},r={service:e.service,action:e.action};return Object.assign(t,s({},this.requests.length,Object.assign(r,e.params))),Object.assign(t,this.params),this.params=t,this}},{key:"execute",value:function(e){var t=this;return new Promise((function(r,n){try{t.params=JSON.stringify(t.params)}catch(e){i._logger.error("".concat(e.message)),n(new f(f.Severity.CRITICAL,f.Category.PROVIDER,f.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(o){var i=new _(o,e);i.success?r({headers:t.responseHeaders,response:i}):n(new f(f.Severity.CRITICAL,f.Category.NETWORK,f.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:i.results}))}),(function(e){n(e)}))}))}}]),i}(l);s(O,"_logger",c("MultiRequestBuilder"));var _=a((function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r(this,e),s(this,"results",[]);var o=t.result?t.result:t,i=(Array.isArray(o)?o:[o]).map((function(e){return new E(e)})),a=i.filter((function(e){return e.hasError}));a.forEach((function(t){e._logger.error("Service returned an error with error code: ".concat(t.error.code," and message: ").concat(t.error.message,"."))})),this.results=i,n&&a.length||a.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)}));s(_,"_logger",c("MultiRequestResult"));var T=function(e){d(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=R(t);if(n){var o=R(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function i(){return r(this,i),o.apply(this,arguments)}return a(i,null,[{key:"add",value:function(e,t,r){var n=new Map;n.set("Content-Type","application/json");var o=new l(n);o.service="bookmark",o.action="add",o.method="POST",o.url=o.getUrl(e);var i={objectType:"KalturaBookmarkPlayerData",action:r.playerData.action,averageBitrate:r.playerData.averageBitrate,totalBitrate:r.playerData.totalBitrate,currentBitrate:r.playerData.currentBitrate,fileId:r.playerData.fileId},a={objectType:"KalturaBookmark",type:r.type,context:r.context,id:r.id,position:r.position,playerData:i};r.programId&&(a.programId=r.programId);var s=h.get().serviceParams;return Object.assign(s,{bookmark:a,ks:t}),o.params=JSON.stringify(s),o}}]),i}(function(){function e(){r(this,e)}return a(e,null,[{key:"getMultiRequest",value:function(e,t){var r=h.get(),n=r.serviceParams;e&&Object.assign(n,{ks:e}),t&&Object.assign(n,{partnerId:t});var o=new Map;o.set("Content-Type","application/json");var i=new O(o);return i.method="POST",i.service="multirequest",i.url=i.getUrl(r.serviceUrl),i.params=n,i}}]),e}()),S="@playkit-js/playkit-js-providers-bookmark-service",A="2.41.0-canary.0-bb5f4a7";return t}()}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}e.r(t),e.d(t,{NAME:function(){return S},OTTBookmarkService:function(){return T},OTTConfiguration:function(){return h},RequestBuilder:function(){return l},VERSION:function(){return A}});var u=function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}};var c=function(e){return u(e)},f=a((function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,e),this.severity=t,this.category=n,this.code=o,this.data=i,e._logger.error("Category:".concat(n," | Code:").concat(o," |"),i)}));s(f,"Severity",{RECOVERABLE:1,CRITICAL:2}),s(f,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),s(f,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),s(f,"_logger",c("Error"));var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;r(this,e),s(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),s(this,"_attemptCounter",1),this.headers=t}return a(e,[{key:"getUrl",value:function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var e=this,t=new Promise((function(t,r){e._requestPromise={resolve:t,reject:r}}));return this.url||this._requestPromise.reject(new f(f.Severity.CRITICAL,f.Category.NETWORK,f.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t}},{key:"_createXHR",value:function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var r=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(r)}catch(r){e._requestPromise.reject(e._createError(t,f.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var r=performance.now();t.ontimeout=function(){e._handleError(t,f.Code.TIMEOUT,{timeout:(performance.now()-r)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,f.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,r){t.setRequestHeader(r,e)})),t.send(this.params)}},{key:"_getResponseHeaders",value:function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))}},{key:"_handleError",value:function(e,t,r){var n=this._createError(e,t,r);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(n);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(e,t,r){return Object.assign(r,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new f(f.Severity.CRITICAL,f.Category.NETWORK,t,r)}}]),e}(),p=function e(t){var r;return Array.isArray(t)?(r=t.length>0?t.slice(0):[]).forEach((function(t,o){("object"===n(t)||Array.isArray(t)&&t.length>0)&&(r[o]=e(t))})):"object"===n(t)?(r=Object.assign({},t),Object.keys(r).forEach((function(t){("object"===n(r[t])||Array.isArray(r[t])&&r[t].length>0)&&(r[t]=e(r[t]))}))):r=t,r},y={serviceParams:{apiVersion:"7.8.1"}},h=function(){function e(){r(this,e)}return a(e,null,[{key:"set",value:function(e){e&&Object.assign(y,e)}},{key:"get",value:function(){return p(y)}}]),e}();function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var E=a((function e(t){r(this,e),s(this,"hasError",!1),"KalturaAPIException"===t.objectType?(this.hasError=!0,this.error=new b(t.code,t.message)):t.error&&"KalturaAPIException"===t.error.objectType?(this.hasError=!0,this.error=new b(t.error.code,t.error.message)):this.data=t})),b=a((function e(t,n){r(this,e),this.code=t,this.message=n}));var O=function(e){d(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=R(t);if(n){var o=R(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function i(){var e;r(this,i);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return s(m(e=o.call.apply(o,[this].concat(n))),"requests",[]),e}return a(i,[{key:"add",value:function(e){this.requests.push(e);var t={},r={service:e.service,action:e.action};return Object.assign(t,s({},this.requests.length,Object.assign(r,e.params))),Object.assign(t,this.params),this.params=t,this}},{key:"execute",value:function(e){var t=this;return new Promise((function(r,n){try{t.params=JSON.stringify(t.params)}catch(e){i._logger.error("".concat(e.message)),n(new f(f.Severity.CRITICAL,f.Category.PROVIDER,f.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(o){var i=new _(o,e);i.success?r({headers:t.responseHeaders,response:i}):n(new f(f.Severity.CRITICAL,f.Category.NETWORK,f.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:i.results}))}),(function(e){n(e)}))}))}}]),i}(l);s(O,"_logger",c("MultiRequestBuilder"));var _=a((function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r(this,e),s(this,"results",[]);var o=t.result?t.result:t,i=(Array.isArray(o)?o:[o]).map((function(e){return new E(e)})),a=i.filter((function(e){return e.hasError}));a.forEach((function(t){e._logger.error("Service returned an error with error code: ".concat(t.error.code," and message: ").concat(t.error.message,"."))})),this.results=i,n&&a.length||a.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)}));s(_,"_logger",c("MultiRequestResult"));var T=function(e){d(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=R(t);if(n){var o=R(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function i(){return r(this,i),o.apply(this,arguments)}return a(i,null,[{key:"add",value:function(e,t,r){var n=new Map;n.set("Content-Type","application/json");var o=new l(n);o.service="bookmark",o.action="add",o.method="POST",o.url=o.getUrl(e);var i={objectType:"KalturaBookmarkPlayerData",action:r.playerData.action,averageBitrate:r.playerData.averageBitrate,totalBitrate:r.playerData.totalBitrate,currentBitrate:r.playerData.currentBitrate,fileId:r.playerData.fileId},a={objectType:"KalturaBookmark",type:r.type,context:r.context,id:r.id,position:r.position,playerData:i};r.programId&&(a.programId=r.programId);var s=h.get().serviceParams;return Object.assign(s,{bookmark:a,ks:t}),o.params=JSON.stringify(s),o}}]),i}(function(){function e(){r(this,e)}return a(e,null,[{key:"getMultiRequest",value:function(e,t){var r=h.get(),n=r.serviceParams;e&&Object.assign(n,{ks:e}),t&&Object.assign(n,{partnerId:t});var o=new Map;o.set("Content-Type","application/json");var i=new O(o);return i.method="POST",i.service="multirequest",i.url=i.getUrl(r.serviceUrl),i.params=n,i}}]),e}()),S="@playkit-js/playkit-js-providers-bookmark-service",A="2.41.0-canary.0-fadaac0";return t}()}));
2
2
  //# sourceMappingURL=playkit-bookmark-service.js.map