@playkit-js/playkit-js-providers 2.40.3-canary.0-442924e → 2.40.4-canary.0-b3e5269
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.
- package/analytics-service/package.json +1 -1
- package/bookmark-service/package.json +1 -1
- package/dist/analytics-service.d.ts +160 -0
- package/dist/bookmark-service.d.ts +157 -0
- package/dist/ott-provider.d.ts +543 -0
- package/dist/{index.d.ts → ovp-provider.d.ts} +73 -120
- package/dist/playkit-analytics-service.js +1 -1
- package/dist/playkit-bookmark-service.js +1 -1
- package/dist/playkit-ott-provider.js +1 -1
- package/dist/playkit-ovp-provider.js +1 -1
- package/dist/playkit-stats-service.js +1 -1
- package/dist/stats-service.d.ts +159 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types.d.ts +390 -0
- package/ott-provider/package.json +1 -1
- package/ovp-provider/package.json +1 -1
- package/package.json +14 -7
- package/src/types/index.ts +0 -8
- package/stats-service/package.json +1 -1
- package/types/package.json +5 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
declare class MultiRequestBuilder extends RequestBuilder {
|
|
2
|
+
private static _logger;
|
|
3
|
+
/**
|
|
4
|
+
* @memberof - MultiRequestBuilder
|
|
5
|
+
* @type {Array<RequestBuilder>}
|
|
6
|
+
*/
|
|
7
|
+
requests: Array<RequestBuilder>;
|
|
8
|
+
/**
|
|
9
|
+
* Adds request to requests array
|
|
10
|
+
* @function add
|
|
11
|
+
* @param {RequestBuilder} request The request
|
|
12
|
+
* @returns {MultiRequestBuilder} The multiRequest
|
|
13
|
+
*/
|
|
14
|
+
add(request: RequestBuilder): MultiRequestBuilder;
|
|
15
|
+
/**
|
|
16
|
+
* Executes a multi request
|
|
17
|
+
* @function execute
|
|
18
|
+
* @param {boolean} requestsMustSucceed whether all of the requests must succeed or not
|
|
19
|
+
* @returns {Promise} The multirequest execution promise
|
|
20
|
+
*/
|
|
21
|
+
execute(requestsMustSucceed?: boolean): Promise<any>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare const NAME: string;
|
|
25
|
+
|
|
26
|
+
export declare class OVPConfiguration {
|
|
27
|
+
static set(clientConfig?: ProviderEnvConfigObject): void;
|
|
28
|
+
static get(): any;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare class OVPService {
|
|
32
|
+
/**
|
|
33
|
+
* Gets a new instance of MultiRequestBuilder with ovp params
|
|
34
|
+
* @function getMultiRequest
|
|
35
|
+
* @param {string} playerVersion The player version
|
|
36
|
+
* @param {string} ks The ks
|
|
37
|
+
* @param {string} partnerId The partner ID
|
|
38
|
+
* @returns {MultiRequestBuilder} The multi request builder
|
|
39
|
+
* @static
|
|
40
|
+
*/
|
|
41
|
+
static getMultiRequest(playerVersion: string, ks: string, partnerId?: number): MultiRequestBuilder;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare class OVPStatsService extends OVPService {
|
|
45
|
+
/**
|
|
46
|
+
* Creates an instance of RequestBuilder for stats.collect
|
|
47
|
+
* @function collect
|
|
48
|
+
* @param {string} serviceUrl - The service base url
|
|
49
|
+
* @param {string} ks - The ks
|
|
50
|
+
* @param {string} playerVersion - The player version
|
|
51
|
+
* @param {Object} event - The event data
|
|
52
|
+
* @returns {RequestBuilder} - The request builder
|
|
53
|
+
* @static
|
|
54
|
+
*/
|
|
55
|
+
static collect(serviceUrl: string, ks: string, playerVersion: string, event: any): RequestBuilder;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare type ProviderEnvConfigObject = {
|
|
59
|
+
serviceUrl: string;
|
|
60
|
+
cdnUrl?: string;
|
|
61
|
+
analyticsServiceUrl?: string;
|
|
62
|
+
useApiCaptions?: boolean;
|
|
63
|
+
replaceHostOnlyManifestUrls?: boolean;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
declare type ProviderNetworkRetryParameters = {
|
|
67
|
+
async: boolean;
|
|
68
|
+
timeout?: number;
|
|
69
|
+
maxAttempts?: number;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export declare class RequestBuilder {
|
|
73
|
+
/**
|
|
74
|
+
* @member - Service name
|
|
75
|
+
* @type {string}
|
|
76
|
+
*/
|
|
77
|
+
service: string;
|
|
78
|
+
/**
|
|
79
|
+
* @member - Service action
|
|
80
|
+
* @type {string}
|
|
81
|
+
*/
|
|
82
|
+
action: string;
|
|
83
|
+
/**
|
|
84
|
+
* @member - Service params
|
|
85
|
+
* @type {any}
|
|
86
|
+
*/
|
|
87
|
+
params: any;
|
|
88
|
+
/**
|
|
89
|
+
* @memberof - Service headers
|
|
90
|
+
* @type {Map<string, string>}
|
|
91
|
+
*/
|
|
92
|
+
headers: Map<string, string>;
|
|
93
|
+
/**
|
|
94
|
+
* @memberof - Service URL
|
|
95
|
+
* @type {string}
|
|
96
|
+
*/
|
|
97
|
+
url: string;
|
|
98
|
+
/**
|
|
99
|
+
* @memberof - Service method (POST,GET,DELETE etc..)
|
|
100
|
+
* @type {string}
|
|
101
|
+
*/
|
|
102
|
+
method: string;
|
|
103
|
+
/**
|
|
104
|
+
* @memberof - Service tag
|
|
105
|
+
* @type {string}
|
|
106
|
+
*/
|
|
107
|
+
tag: string;
|
|
108
|
+
/**
|
|
109
|
+
* @memberof - the response headers of the arra
|
|
110
|
+
* @type {Array<string>}
|
|
111
|
+
*/
|
|
112
|
+
responseHeaders: Array<string>;
|
|
113
|
+
/**
|
|
114
|
+
* @description network retry configuration
|
|
115
|
+
* @memberof RequestBuilder
|
|
116
|
+
* @type {ProviderNetworkRetryParameters}
|
|
117
|
+
*/
|
|
118
|
+
retryConfig: ProviderNetworkRetryParameters;
|
|
119
|
+
/**
|
|
120
|
+
* @description number of xhr attempts for the same multi - request.
|
|
121
|
+
* @memberof RequestBuilder
|
|
122
|
+
* @type {number}
|
|
123
|
+
* @private
|
|
124
|
+
*/
|
|
125
|
+
private _attemptCounter;
|
|
126
|
+
/**
|
|
127
|
+
* @description hold the promise result of the XHR request(s) - if all tries fails, it rejects with the error.
|
|
128
|
+
* @memberof RequestBuilder
|
|
129
|
+
* @type {Object}
|
|
130
|
+
* @private
|
|
131
|
+
*/
|
|
132
|
+
private _requestPromise;
|
|
133
|
+
/**
|
|
134
|
+
* @constructor
|
|
135
|
+
* @param {Map<string, string>} headers The request headers
|
|
136
|
+
*/
|
|
137
|
+
constructor(headers?: Map<string, string>);
|
|
138
|
+
/**
|
|
139
|
+
* Builds restful service URL
|
|
140
|
+
* @function getUrl
|
|
141
|
+
* @param {string} serviceUrl - The service base URL
|
|
142
|
+
* @returns {string} The service URL
|
|
143
|
+
*/
|
|
144
|
+
getUrl(serviceUrl: string): string;
|
|
145
|
+
/**
|
|
146
|
+
* Executes service
|
|
147
|
+
* @function doHttpRequest
|
|
148
|
+
* @returns {Promise.<any>} Service response as promise
|
|
149
|
+
*/
|
|
150
|
+
doHttpRequest(): Promise<any>;
|
|
151
|
+
private _createXHR;
|
|
152
|
+
private _getResponseHeaders;
|
|
153
|
+
private _handleError;
|
|
154
|
+
private _createError;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export declare const VERSION: string;
|
|
158
|
+
|
|
159
|
+
export { }
|
package/dist/tsdoc-metadata.json
CHANGED
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
export declare type AdapterDataConfig = {
|
|
2
|
+
[key: string]: {
|
|
3
|
+
value: string;
|
|
4
|
+
objectType?: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export declare type CaptionType = {
|
|
9
|
+
[type: string]: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare class DocumentSource {
|
|
13
|
+
/**
|
|
14
|
+
* @member - media source id
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* @member - media source url
|
|
20
|
+
* @type {string}
|
|
21
|
+
*/
|
|
22
|
+
url: string;
|
|
23
|
+
/**
|
|
24
|
+
* @member - thumbnail url
|
|
25
|
+
* @type {string}
|
|
26
|
+
*/
|
|
27
|
+
thumbnailUrl: string;
|
|
28
|
+
/**
|
|
29
|
+
* @member - media source mimetype
|
|
30
|
+
* @type {string}
|
|
31
|
+
*/
|
|
32
|
+
mimetype: string;
|
|
33
|
+
constructor(entry: any);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare interface ILoader {
|
|
37
|
+
requests: Array<RequestBuilder>;
|
|
38
|
+
response: any;
|
|
39
|
+
isValid(): boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class ImageSource {
|
|
43
|
+
/**
|
|
44
|
+
* @member - media source id
|
|
45
|
+
* @type {string}
|
|
46
|
+
*/
|
|
47
|
+
id: string;
|
|
48
|
+
/**
|
|
49
|
+
* @member - media source url
|
|
50
|
+
* @type {string}
|
|
51
|
+
*/
|
|
52
|
+
url: string;
|
|
53
|
+
/**
|
|
54
|
+
* @member - media source mimetype
|
|
55
|
+
* @type {string}
|
|
56
|
+
*/
|
|
57
|
+
mimetype: string;
|
|
58
|
+
constructor(entry: any);
|
|
59
|
+
/**
|
|
60
|
+
* Extract the base thumbnail url.
|
|
61
|
+
* @param {string} url - dataUrl.
|
|
62
|
+
* @returns {string} - The base thumbnail url.
|
|
63
|
+
*/
|
|
64
|
+
static extractBaseThumbnailUrl(url: string): string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare type loggerFunctionType = {
|
|
68
|
+
VERSION: string;
|
|
69
|
+
DEBUG: LogLevelObject;
|
|
70
|
+
ERROR: LogLevelObject;
|
|
71
|
+
INFO: LogLevelObject;
|
|
72
|
+
OFF: LogLevelObject;
|
|
73
|
+
TIME: LogLevelObject;
|
|
74
|
+
TRACE: LogLevelObject;
|
|
75
|
+
WARN: LogLevelObject;
|
|
76
|
+
createDefaultHandler: () => any;
|
|
77
|
+
debug: () => any;
|
|
78
|
+
enabledFor: () => any;
|
|
79
|
+
error: () => any;
|
|
80
|
+
get: () => any;
|
|
81
|
+
getLevel: () => any;
|
|
82
|
+
info: () => any;
|
|
83
|
+
log: () => any;
|
|
84
|
+
setHandler: () => any;
|
|
85
|
+
setLevel: () => any;
|
|
86
|
+
time: () => any;
|
|
87
|
+
timeEnd: () => any;
|
|
88
|
+
trace: () => any;
|
|
89
|
+
useDefaults: () => any;
|
|
90
|
+
warn: () => any;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
declare type LoggerType = {
|
|
94
|
+
getLogger: loggerFunctionType;
|
|
95
|
+
LogLevel: LogLevelType;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
declare type LogLevelObject = {
|
|
99
|
+
value: number;
|
|
100
|
+
name: string;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
declare type LogLevelType = {
|
|
104
|
+
[level: string]: LogLevelObject;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export declare type OTTProviderMediaInfoObject = OVPProviderMediaInfoObject & {
|
|
108
|
+
mediaType: string;
|
|
109
|
+
contextType: string;
|
|
110
|
+
protocol?: string;
|
|
111
|
+
fileIds?: string;
|
|
112
|
+
streamerType?: string;
|
|
113
|
+
urlType?: string;
|
|
114
|
+
adapterData?: AdapterDataConfig;
|
|
115
|
+
assetReferenceType?: string;
|
|
116
|
+
formats?: Array<string>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export declare type OVPProviderMediaInfoObject = {
|
|
120
|
+
entryId?: string;
|
|
121
|
+
referenceId?: string;
|
|
122
|
+
ks?: string;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export declare type PKExternalCaptionObject = {
|
|
126
|
+
url: string;
|
|
127
|
+
label: string;
|
|
128
|
+
language: string;
|
|
129
|
+
default?: boolean;
|
|
130
|
+
type?: string;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export declare interface Poster {
|
|
134
|
+
width: number;
|
|
135
|
+
height: number;
|
|
136
|
+
url: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export declare type ProviderDrmDataObject = {
|
|
140
|
+
licenseUrl: string;
|
|
141
|
+
scheme: string;
|
|
142
|
+
certificate?: string;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export declare type ProviderEntryListObject = {
|
|
146
|
+
entries: Array<ProviderMediaInfoObject>;
|
|
147
|
+
ks?: string;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export declare type ProviderEnvConfigObject = {
|
|
151
|
+
serviceUrl: string;
|
|
152
|
+
cdnUrl?: string;
|
|
153
|
+
analyticsServiceUrl?: string;
|
|
154
|
+
useApiCaptions?: boolean;
|
|
155
|
+
replaceHostOnlyManifestUrls?: boolean;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export declare type ProviderFilterOptionsObject = {
|
|
159
|
+
redirectFromEntryId?: boolean;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export declare type ProviderMediaConfigMetadataObject = {
|
|
163
|
+
name: string;
|
|
164
|
+
description?: string;
|
|
165
|
+
mediaType?: string;
|
|
166
|
+
contextType?: string;
|
|
167
|
+
metas?: any;
|
|
168
|
+
tags?: any;
|
|
169
|
+
epgId?: string;
|
|
170
|
+
recordingId?: string;
|
|
171
|
+
updatedAt?: number;
|
|
172
|
+
creatorId?: string;
|
|
173
|
+
views?: number;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export declare type ProviderMediaConfigObject = {
|
|
177
|
+
session: ProviderMediaConfigSessionObject;
|
|
178
|
+
sources: ProviderMediaConfigSourcesObject;
|
|
179
|
+
plugins: {
|
|
180
|
+
[plugin: string]: any;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export declare type ProviderMediaConfigSessionObject = {
|
|
185
|
+
partnerId: number;
|
|
186
|
+
uiConfId?: number;
|
|
187
|
+
ks?: string;
|
|
188
|
+
isAnonymous?: boolean;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export declare type ProviderMediaConfigSourcesObject = {
|
|
192
|
+
dash: Array<ProviderMediaSourceObject>;
|
|
193
|
+
hls: Array<ProviderMediaSourceObject>;
|
|
194
|
+
progressive: Array<ProviderMediaSourceObject>;
|
|
195
|
+
image: Array<ImageSource>;
|
|
196
|
+
document: Array<DocumentSource>;
|
|
197
|
+
duration?: number;
|
|
198
|
+
type: string;
|
|
199
|
+
id?: string;
|
|
200
|
+
poster?: string | Array<any>;
|
|
201
|
+
dvr: boolean;
|
|
202
|
+
vr?: any;
|
|
203
|
+
metadata: ProviderMediaConfigMetadataObject;
|
|
204
|
+
captions?: Array<PKExternalCaptionObject>;
|
|
205
|
+
downloadUrl?: string;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export declare type ProviderMediaEntryObject = {
|
|
209
|
+
id?: string;
|
|
210
|
+
name?: string;
|
|
211
|
+
sources: ProviderMediaSourcesObject;
|
|
212
|
+
duration?: number;
|
|
213
|
+
dvrStatus?: number;
|
|
214
|
+
status?: number;
|
|
215
|
+
metadata: any;
|
|
216
|
+
type: string;
|
|
217
|
+
poster?: string | Poster[];
|
|
218
|
+
downloadUrl?: string;
|
|
219
|
+
assetReferenceType?: string;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export declare type ProviderMediaFormatType = {
|
|
223
|
+
name: string;
|
|
224
|
+
mimeType: string;
|
|
225
|
+
pathExt: string;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export declare type ProviderMediaInfoObject = OVPProviderMediaInfoObject | OTTProviderMediaInfoObject;
|
|
229
|
+
|
|
230
|
+
export declare type ProviderMediaSourceObject = {
|
|
231
|
+
id: string;
|
|
232
|
+
url: string;
|
|
233
|
+
mimetype: string;
|
|
234
|
+
bandwidth?: number;
|
|
235
|
+
width?: number;
|
|
236
|
+
height?: number;
|
|
237
|
+
label?: string;
|
|
238
|
+
drmData?: Array<ProviderDrmDataObject>;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
export declare type ProviderMediaSourcesObject = {
|
|
242
|
+
progressive: Array<ProviderMediaSourceObject>;
|
|
243
|
+
dash: Array<ProviderMediaSourceObject>;
|
|
244
|
+
hls: Array<ProviderMediaSourceObject>;
|
|
245
|
+
image: Array<ImageSource>;
|
|
246
|
+
document: Array<DocumentSource>;
|
|
247
|
+
captions?: Array<PKExternalCaptionObject>;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
export declare type ProviderNetworkRetryParameters = {
|
|
251
|
+
async: boolean;
|
|
252
|
+
timeout?: number;
|
|
253
|
+
maxAttempts?: number;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
export declare type ProviderOptionsObject = {
|
|
257
|
+
partnerId: number;
|
|
258
|
+
widgetId?: string;
|
|
259
|
+
logger?: LoggerType;
|
|
260
|
+
ks?: string;
|
|
261
|
+
uiConfId?: number;
|
|
262
|
+
env?: ProviderEnvConfigObject;
|
|
263
|
+
networkRetryParameters?: ProviderNetworkRetryParameters;
|
|
264
|
+
filterOptions?: ProviderFilterOptionsObject;
|
|
265
|
+
ignoreServerConfig?: boolean;
|
|
266
|
+
loadThumbnailWithKs?: boolean;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export declare type ProviderPlaybackContextOptions = {
|
|
270
|
+
mediaProtocol?: string;
|
|
271
|
+
assetFileIds?: string;
|
|
272
|
+
context?: string;
|
|
273
|
+
streamerType?: string;
|
|
274
|
+
urlType?: string;
|
|
275
|
+
adapterData?: AdapterDataConfig;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
export declare type ProviderPlaylistInfoObject = {
|
|
279
|
+
playlistId: string;
|
|
280
|
+
ks?: string;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
declare type ProviderPlaylistItemObject = {
|
|
284
|
+
sources: ProviderMediaConfigSourcesObject;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export declare type ProviderPlaylistMetadataObject = {
|
|
288
|
+
name: string;
|
|
289
|
+
description: string;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export declare type ProviderPlaylistObject = {
|
|
293
|
+
id: string;
|
|
294
|
+
metadata: ProviderPlaylistMetadataObject;
|
|
295
|
+
poster: string;
|
|
296
|
+
items: Array<ProviderPlaylistItemObject>;
|
|
297
|
+
playlistLastEntryId?: string;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
declare class RequestBuilder {
|
|
301
|
+
/**
|
|
302
|
+
* @member - Service name
|
|
303
|
+
* @type {string}
|
|
304
|
+
*/
|
|
305
|
+
service: string;
|
|
306
|
+
/**
|
|
307
|
+
* @member - Service action
|
|
308
|
+
* @type {string}
|
|
309
|
+
*/
|
|
310
|
+
action: string;
|
|
311
|
+
/**
|
|
312
|
+
* @member - Service params
|
|
313
|
+
* @type {any}
|
|
314
|
+
*/
|
|
315
|
+
params: any;
|
|
316
|
+
/**
|
|
317
|
+
* @memberof - Service headers
|
|
318
|
+
* @type {Map<string, string>}
|
|
319
|
+
*/
|
|
320
|
+
headers: Map<string, string>;
|
|
321
|
+
/**
|
|
322
|
+
* @memberof - Service URL
|
|
323
|
+
* @type {string}
|
|
324
|
+
*/
|
|
325
|
+
url: string;
|
|
326
|
+
/**
|
|
327
|
+
* @memberof - Service method (POST,GET,DELETE etc..)
|
|
328
|
+
* @type {string}
|
|
329
|
+
*/
|
|
330
|
+
method: string;
|
|
331
|
+
/**
|
|
332
|
+
* @memberof - Service tag
|
|
333
|
+
* @type {string}
|
|
334
|
+
*/
|
|
335
|
+
tag: string;
|
|
336
|
+
/**
|
|
337
|
+
* @memberof - the response headers of the arra
|
|
338
|
+
* @type {Array<string>}
|
|
339
|
+
*/
|
|
340
|
+
responseHeaders: Array<string>;
|
|
341
|
+
/**
|
|
342
|
+
* @description network retry configuration
|
|
343
|
+
* @memberof RequestBuilder
|
|
344
|
+
* @type {ProviderNetworkRetryParameters}
|
|
345
|
+
*/
|
|
346
|
+
retryConfig: ProviderNetworkRetryParameters;
|
|
347
|
+
/**
|
|
348
|
+
* @description number of xhr attempts for the same multi - request.
|
|
349
|
+
* @memberof RequestBuilder
|
|
350
|
+
* @type {number}
|
|
351
|
+
* @private
|
|
352
|
+
*/
|
|
353
|
+
private _attemptCounter;
|
|
354
|
+
/**
|
|
355
|
+
* @description hold the promise result of the XHR request(s) - if all tries fails, it rejects with the error.
|
|
356
|
+
* @memberof RequestBuilder
|
|
357
|
+
* @type {Object}
|
|
358
|
+
* @private
|
|
359
|
+
*/
|
|
360
|
+
private _requestPromise;
|
|
361
|
+
/**
|
|
362
|
+
* @constructor
|
|
363
|
+
* @param {Map<string, string>} headers The request headers
|
|
364
|
+
*/
|
|
365
|
+
constructor(headers?: Map<string, string>);
|
|
366
|
+
/**
|
|
367
|
+
* Builds restful service URL
|
|
368
|
+
* @function getUrl
|
|
369
|
+
* @param {string} serviceUrl - The service base URL
|
|
370
|
+
* @returns {string} The service URL
|
|
371
|
+
*/
|
|
372
|
+
getUrl(serviceUrl: string): string;
|
|
373
|
+
/**
|
|
374
|
+
* Executes service
|
|
375
|
+
* @function doHttpRequest
|
|
376
|
+
* @returns {Promise.<any>} Service response as promise
|
|
377
|
+
*/
|
|
378
|
+
doHttpRequest(): Promise<any>;
|
|
379
|
+
private _createXHR;
|
|
380
|
+
private _getResponseHeaders;
|
|
381
|
+
private _handleError;
|
|
382
|
+
private _createError;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export declare type RequestLoader = {
|
|
386
|
+
loader: ILoader;
|
|
387
|
+
params: any;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playkit-js/playkit-js-providers",
|
|
3
|
-
"version": "2.40.
|
|
3
|
+
"version": "2.40.4-canary.0-b3e5269",
|
|
4
4
|
"description": "",
|
|
5
|
-
"types": "./dist/index.d.ts",
|
|
6
5
|
"files": [
|
|
7
6
|
"dist/**/*",
|
|
8
7
|
"src/**/*",
|
|
@@ -11,21 +10,29 @@
|
|
|
11
10
|
"bookmark-service/*",
|
|
12
11
|
"ott-provider/*",
|
|
13
12
|
"ovp-provider/*",
|
|
14
|
-
"stats-service/*"
|
|
13
|
+
"stats-service/*",
|
|
14
|
+
"types/*"
|
|
15
15
|
],
|
|
16
16
|
"exports": {
|
|
17
17
|
"./ovp-provider": "./dist/playkit-ovp-provider.js",
|
|
18
18
|
"./ott-provider": "./dist/playkit-ott-provider.js",
|
|
19
19
|
"./analytics-service": "./dist/playkit-analytics-service.js",
|
|
20
20
|
"./stats-service": "./dist/playkit-stats-service.js",
|
|
21
|
-
"./bookmark-service": "./dist/playkit-bookmark-service.js"
|
|
21
|
+
"./bookmark-service": "./dist/playkit-bookmark-service.js",
|
|
22
|
+
"./types": "./dist/types.d.ts"
|
|
22
23
|
},
|
|
23
24
|
"scripts": {
|
|
24
25
|
"serve": "webpack serve --open --mode=development",
|
|
25
26
|
"build:dev": "webpack --mode=development",
|
|
26
27
|
"build:prod": "webpack --mode=production --node-env=production",
|
|
27
28
|
"build": "yarn run build:prod && yarn run build:types",
|
|
28
|
-
"build:types": "
|
|
29
|
+
"build:types": "yarn run build:types:ovp && yarn run build:types:ott && yarn run build:types:analytics && yarn run build:types:bookmark && yarn run build:types:stats && yarn run build:types:types",
|
|
30
|
+
"build:types:ovp": "tsc --build tsconfig-lib.json && mkdir -p lib && api-extractor run --config api-extracor-config/api-extractor-ovp-provider.json --local",
|
|
31
|
+
"build:types:ott": "tsc --build tsconfig-lib.json && mkdir -p lib && api-extractor run --config api-extracor-config/api-extractor-ott-provider.json --local",
|
|
32
|
+
"build:types:analytics": "tsc --build tsconfig-lib.json && mkdir -p lib && api-extractor run --config api-extracor-config/api-extractor-analytics-service.json --local",
|
|
33
|
+
"build:types:bookmark": "tsc --build tsconfig-lib.json && mkdir -p lib && api-extractor run --config api-extracor-config/api-extractor-bookmark-service.json --local",
|
|
34
|
+
"build:types:stats": "tsc --build tsconfig-lib.json && mkdir -p lib && api-extractor run --config api-extracor-config/api-extractor-stats-service.json --local",
|
|
35
|
+
"build:types:types": "tsc --build tsconfig-lib.json && mkdir -p lib && api-extractor run --config api-extracor-config/api-extractor-types.json --local",
|
|
29
36
|
"type-check": "tsc --noEmit",
|
|
30
37
|
"type-check:watch": "npm run type-check -- --watch",
|
|
31
38
|
"watch": "webpack --mode=development --watch",
|
|
@@ -43,8 +50,8 @@
|
|
|
43
50
|
"@babel/plugin-transform-runtime": "^7.22.15",
|
|
44
51
|
"@babel/preset-env": "^7.21.5",
|
|
45
52
|
"@babel/preset-typescript": "^7.22.15",
|
|
46
|
-
"@microsoft/api-extractor": "^7.
|
|
47
|
-
"@playkit-js/browserslist-config": "
|
|
53
|
+
"@microsoft/api-extractor": "^7.39.4",
|
|
54
|
+
"@playkit-js/browserslist-config": "1.0.8",
|
|
48
55
|
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
|
49
56
|
"@typescript-eslint/parser": "^6.7.2",
|
|
50
57
|
"babel-eslint": "^10.1.0",
|
package/src/types/index.ts
CHANGED
|
@@ -24,11 +24,3 @@ export * from './playlist-info'
|
|
|
24
24
|
export * from './provider-options'
|
|
25
25
|
export * from './request-loader'
|
|
26
26
|
export * from './poster'
|
|
27
|
-
|
|
28
|
-
export { ProviderParser, RequestBuilder, ResponseTypes} from '../k-provider/ovp'
|
|
29
|
-
export { ContextType, MediaType} from '../k-provider/ott'
|
|
30
|
-
import {BaseProvider} from '../k-provider/common/base-provider'
|
|
31
|
-
import OTTProvider from '../k-provider/ott/provider'
|
|
32
|
-
import OVPProvider from '../k-provider/ovp/provider'
|
|
33
|
-
export {OTTProvider, OVPProvider, OTTProvider as Provider, BaseProvider}
|
|
34
|
-
export type IProvider = OTTProvider | OVPProvider;
|