@playkit-js/playkit-js-providers 2.43.2 → 2.43.3-canary.0-c82994b

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.
@@ -5,6 +5,7 @@ import {KalturaAccessControlModifyRequestHostRegexAction} from './kaltura-access
5
5
  import {KalturaRuleAction} from './kaltura-rule-action';
6
6
  import {KalturaFlavorAsset} from './kaltura-flavor-asset';
7
7
  import {KalturaBumper} from './kaltura-bumper';
8
+ import {ActiveLiveStreamTime} from './kaltura-active-live-stream-time';
8
9
 
9
10
  export class KalturaPlaybackContext extends ServiceResult {
10
11
  /**
@@ -33,6 +34,8 @@ export class KalturaPlaybackContext extends ServiceResult {
33
34
  */
34
35
  public bumperData: Array<KalturaBumper> = [];
35
36
 
37
+ public activeLiveStreamTime?: ActiveLiveStreamTime | undefined;
38
+
36
39
  /**
37
40
  * @constructor
38
41
  * @param {Object} response The response
@@ -66,6 +69,13 @@ export class KalturaPlaybackContext extends ServiceResult {
66
69
  if (bumperData) {
67
70
  bumperData.map(bumper => this.bumperData.push(new KalturaBumper(bumper)));
68
71
  }
72
+
73
+ if (response.activeLiveStreamTime) {
74
+ this.activeLiveStreamTime = {
75
+ startTime: response.activeLiveStreamTime.startTime,
76
+ endTime: response.activeLiveStreamTime.endTime
77
+ };
78
+ }
69
79
  }
70
80
  }
71
81
 
@@ -14,7 +14,7 @@ export default class OVPPlaylistService extends OVPService {
14
14
  * @returns {RequestBuilder} The request builder
15
15
  * @static
16
16
  */
17
- public static execute(serviceUrl: string, ks: string, playlistId: string): RequestBuilder {
17
+ public static execute(serviceUrl: string, ks: string, playlistId: string, cacheToken?: string): RequestBuilder {
18
18
  const headers: Map<string, string> = new Map();
19
19
  headers.set('Content-Type', 'application/json');
20
20
  const request = new RequestBuilder(headers);
@@ -23,10 +23,17 @@ export default class OVPPlaylistService extends OVPService {
23
23
  request.method = 'POST';
24
24
  request.url = request.getUrl(serviceUrl);
25
25
  request.tag = `${SERVICE_NAME}-execute`;
26
+
27
+ const responseProfile = new BaseEntryResponseProfile();
28
+ // Append commas cache token to fields to bust cache on retry
29
+ if (cacheToken) {
30
+ responseProfile.fields = responseProfile.fields + cacheToken;
31
+ }
32
+
26
33
  request.params = {
27
34
  ks: ks,
28
35
  id: playlistId,
29
- responseProfile: new BaseEntryResponseProfile()
36
+ responseProfile: responseProfile
30
37
  };
31
38
  return request;
32
39
  }
@@ -3,8 +3,10 @@ import {DocumentSource} from '../entities/document-source';
3
3
  import {ProviderMediaConfigMetadataObject} from './media-config-metadata';
4
4
  import {PKExternalCaptionObject} from './external-caption-object';
5
5
  import {ProviderMediaSourceObject} from './media-source';
6
+ import {ActiveLiveStreamTime} from '../k-provider/ovp/response-types/kaltura-active-live-stream-time';
6
7
 
7
8
  export type ProviderMediaConfigSourcesObject = {
9
+ activeLiveStreamTime?: ActiveLiveStreamTime;
8
10
  dash: Array<ProviderMediaSourceObject>;
9
11
  hls: Array<ProviderMediaSourceObject>;
10
12
  progressive: Array<ProviderMediaSourceObject>;