@playkit-js/playkit-js-providers 2.39.1 → 2.39.2
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/CHANGELOG.md +4 -0
- package/dist/playkit-analytics-service.js +2 -0
- package/dist/playkit-analytics-service.js.map +1 -0
- package/dist/playkit-bookmark-service.js +2 -0
- package/dist/playkit-bookmark-service.js.map +1 -0
- package/dist/playkit-ott-provider.js +2 -0
- package/dist/playkit-ott-provider.js.map +1 -0
- package/dist/playkit-ovp-provider.js +2 -0
- package/dist/playkit-ovp-provider.js.map +1 -0
- package/dist/playkit-stats-service.js +2 -0
- package/dist/playkit-stats-service.js.map +1 -0
- package/package.json +1 -1
- package/.babelrc +0 -22
- package/.editorconfig +0 -10
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -26
- package/.flowconfig +0 -5
- package/.github/ISSUE_TEMPLATE.md +0 -28
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -12
- package/.github/workflows/run_canary_full_flow.yaml +0 -28
- package/.github/workflows/run_prod.yaml +0 -24
- package/.github/workflows/run_tests.yaml +0 -24
- package/.prettierignore +0 -7
- package/.prettierrc +0 -12
- package/docs/configuration.md +0 -225
- package/karma.conf.js +0 -42
- package/src/entities/bumper.js +0 -23
- package/src/entities/drm.js +0 -46
- package/src/entities/entry-list.js +0 -15
- package/src/entities/image-source.js +0 -37
- package/src/entities/media-entry.js +0 -96
- package/src/entities/media-format.js +0 -46
- package/src/entities/media-source.js +0 -70
- package/src/entities/media-sources.js +0 -79
- package/src/entities/playlist.js +0 -37
- package/src/index.html +0 -11
- package/src/k-provider/common/base-provider-parser.js +0 -0
- package/src/k-provider/common/base-provider.js +0 -110
- package/src/k-provider/common/base-service-result.js +0 -57
- package/src/k-provider/common/data-loader-manager.js +0 -115
- package/src/k-provider/common/multi-request-builder.js +0 -112
- package/src/k-provider/common/response-types/kaltura-access-control-message.js +0 -22
- package/src/k-provider/common/response-types/kaltura-drm-playback-plugin-data.js +0 -39
- package/src/k-provider/ott/config.js +0 -22
- package/src/k-provider/ott/index.js +0 -15
- package/src/k-provider/ott/loaders/asset-list-loader.js +0 -68
- package/src/k-provider/ott/loaders/asset-loader.js +0 -69
- package/src/k-provider/ott/loaders/data-loader-manager.js +0 -15
- package/src/k-provider/ott/loaders/session-loader.js +0 -62
- package/src/k-provider/ott/provider-parser.js +0 -282
- package/src/k-provider/ott/provider.js +0 -242
- package/src/k-provider/ott/response-types/kaltura-asset.js +0 -79
- package/src/k-provider/ott/response-types/kaltura-bumper-playback-plugin-data.js +0 -28
- package/src/k-provider/ott/response-types/kaltura-playback-context.js +0 -74
- package/src/k-provider/ott/response-types/kaltura-playback-source.js +0 -63
- package/src/k-provider/ott/response-types/kaltura-rule-action.js +0 -26
- package/src/k-provider/ott/services/asset-service.js +0 -50
- package/src/k-provider/ott/services/bookmark/bookmark-service.js +0 -49
- package/src/k-provider/ott/services/bookmark/index.js +0 -12
- package/src/k-provider/ott/services/ott-service.js +0 -34
- package/src/k-provider/ott/services/user-service.js +0 -32
- package/src/k-provider/ovp/config.js +0 -28
- package/src/k-provider/ovp/external-captions-builder.js +0 -38
- package/src/k-provider/ovp/index.js +0 -13
- package/src/k-provider/ovp/loaders/data-loader-manager.js +0 -17
- package/src/k-provider/ovp/loaders/entry-list-loader.js +0 -69
- package/src/k-provider/ovp/loaders/media-entry-loader.js +0 -84
- package/src/k-provider/ovp/loaders/playlist-loader.js +0 -66
- package/src/k-provider/ovp/loaders/session-loader.js +0 -62
- package/src/k-provider/ovp/loaders/ui-config-loader.js +0 -71
- package/src/k-provider/ovp/play-source-url-builder.js +0 -60
- package/src/k-provider/ovp/provider-parser.js +0 -451
- package/src/k-provider/ovp/provider.js +0 -344
- package/src/k-provider/ovp/regex-action-handler.js +0 -147
- package/src/k-provider/ovp/request-params/base-entry-response-profile.js +0 -29
- package/src/k-provider/ovp/response-types/index.js +0 -18
- package/src/k-provider/ovp/response-types/kaltura-access-control-modify-request-host-regex-action.js +0 -36
- package/src/k-provider/ovp/response-types/kaltura-base-entry-list-response.js +0 -31
- package/src/k-provider/ovp/response-types/kaltura-bumper.js +0 -26
- package/src/k-provider/ovp/response-types/kaltura-flavor-asset.js +0 -109
- package/src/k-provider/ovp/response-types/kaltura-media-entries.js +0 -23
- package/src/k-provider/ovp/response-types/kaltura-media-entry.js +0 -141
- package/src/k-provider/ovp/response-types/kaltura-metadata-list-response.js +0 -23
- package/src/k-provider/ovp/response-types/kaltura-metadata.js +0 -51
- package/src/k-provider/ovp/response-types/kaltura-playback-context.js +0 -96
- package/src/k-provider/ovp/response-types/kaltura-playback-source.js +0 -90
- package/src/k-provider/ovp/response-types/kaltura-playlist.js +0 -35
- package/src/k-provider/ovp/response-types/kaltura-rule-action.js +0 -28
- package/src/k-provider/ovp/response-types/kaltura-ui-conf-response.js +0 -90
- package/src/k-provider/ovp/services/analytics/analytics-service.js +0 -57
- package/src/k-provider/ovp/services/analytics/index.js +0 -12
- package/src/k-provider/ovp/services/base-entry-service.js +0 -76
- package/src/k-provider/ovp/services/meta-data-service.js +0 -30
- package/src/k-provider/ovp/services/ovp-service.js +0 -33
- package/src/k-provider/ovp/services/playlist-service.js +0 -63
- package/src/k-provider/ovp/services/session-service.js +0 -28
- package/src/k-provider/ovp/services/stats/index.js +0 -12
- package/src/k-provider/ovp/services/stats/stats-service.js +0 -33
- package/src/k-provider/ovp/services/ui-conf-service.js +0 -33
- package/src/util/clone.js +0 -23
- package/src/util/error/category.js +0 -12
- package/src/util/error/code.js +0 -79
- package/src/util/error/error.js +0 -48
- package/src/util/error/severity.js +0 -23
- package/src/util/logger.js +0 -108
- package/src/util/param.js +0 -45
- package/src/util/request-builder.js +0 -187
- package/src/util/xml-parser.js +0 -40
- package/test/.eslintrc.json +0 -9
- package/test/setup/karma.js +0 -5
- package/test/setup/load-specs.js +0 -13
- package/test/setup/prepare-test-environment.js +0 -17
- package/test/src/k-provider/ott/be-data.js +0 -3306
- package/test/src/k-provider/ott/media-config-data.js +0 -793
- package/test/src/k-provider/ott/provider-parser.spec.js +0 -30
- package/test/src/k-provider/ott/provider.spec.js +0 -384
- package/test/src/k-provider/ott/services/bookmark-service.spec.js +0 -38
- package/test/src/k-provider/ovp/be-data.js +0 -3932
- package/test/src/k-provider/ovp/external-captions-builder.spec.js +0 -59
- package/test/src/k-provider/ovp/media-config-data.js +0 -1509
- package/test/src/k-provider/ovp/playback-sources-data.js +0 -229
- package/test/src/k-provider/ovp/provider-parser-data.js +0 -142
- package/test/src/k-provider/ovp/provider-parser.spec.js +0 -96
- package/test/src/k-provider/ovp/provider.spec.js +0 -1075
- package/test/src/k-provider/ovp/regex-action-handler-data.js +0 -794
- package/test/src/k-provider/ovp/regex-action-handler.spec.js +0 -93
- package/test/src/k-provider/ovp/services/analytics-service.spec.js +0 -62
- package/test/src/k-provider/ovp/services/stats-service.spec.js +0 -37
- package/test/src/util/param.spec.js +0 -23
- package/webpack.config.js +0 -85
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
export class KalturaFlavorAsset {
|
|
3
|
-
static Status: {[status: string]: number} = {
|
|
4
|
-
ERROR: -1,
|
|
5
|
-
QUEUED: 0,
|
|
6
|
-
CONVERTING: 1,
|
|
7
|
-
READY: 2,
|
|
8
|
-
DELETED: 3,
|
|
9
|
-
NOT_APPLICABLE: 4,
|
|
10
|
-
TEMP: 5,
|
|
11
|
-
WAIT_FOR_CONVERT: 6,
|
|
12
|
-
IMPORTING: 7,
|
|
13
|
-
VALIDATING: 8,
|
|
14
|
-
EXPORTING: 9
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @member - The ID of the Flavor Asset
|
|
19
|
-
* @type {string}
|
|
20
|
-
*/
|
|
21
|
-
id: string;
|
|
22
|
-
/**
|
|
23
|
-
* @member -The Flavor Params used to create this Flavor Asset
|
|
24
|
-
* @type {string}
|
|
25
|
-
*/
|
|
26
|
-
flavorParamsId: string;
|
|
27
|
-
/**
|
|
28
|
-
* @member -The file extension
|
|
29
|
-
* @type {string}
|
|
30
|
-
*/
|
|
31
|
-
fileExt: string;
|
|
32
|
-
/**
|
|
33
|
-
* @member - The overall bitrate (in KBits) of the Flavor Asset
|
|
34
|
-
* @type {string}
|
|
35
|
-
*/
|
|
36
|
-
bitrate: number;
|
|
37
|
-
/**
|
|
38
|
-
* @member - The width of the Flavor Asset
|
|
39
|
-
* @type {number}
|
|
40
|
-
*/
|
|
41
|
-
width: number;
|
|
42
|
-
/**
|
|
43
|
-
* @member - The height of the Flavor Asset
|
|
44
|
-
* @type {number}
|
|
45
|
-
*/
|
|
46
|
-
height: number;
|
|
47
|
-
/**
|
|
48
|
-
* @member - The frame rate (in FPS) of the Flavor Asset
|
|
49
|
-
* @type {number}
|
|
50
|
-
*/
|
|
51
|
-
frameRate: number;
|
|
52
|
-
/**
|
|
53
|
-
* @member - True if this Flavor Asset is the original source
|
|
54
|
-
* @type {number}
|
|
55
|
-
*/
|
|
56
|
-
isOriginal: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* @member - True if this Flavor Asset is playable in KDP
|
|
59
|
-
* @type {boolean}
|
|
60
|
-
*/
|
|
61
|
-
isWeb: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* @member - The container format
|
|
64
|
-
* @type {boolean}
|
|
65
|
-
*/
|
|
66
|
-
containerFormat: string;
|
|
67
|
-
/**
|
|
68
|
-
*@member - The video codec
|
|
69
|
-
* @type {boolean}
|
|
70
|
-
*/
|
|
71
|
-
videoCodecId: string;
|
|
72
|
-
/**
|
|
73
|
-
* @member - The status of the Flavor Asset
|
|
74
|
-
* @type {number}
|
|
75
|
-
*/
|
|
76
|
-
status: number;
|
|
77
|
-
/**
|
|
78
|
-
* @member - The language of the flavor asset
|
|
79
|
-
* @type {Status}
|
|
80
|
-
*/
|
|
81
|
-
language: string;
|
|
82
|
-
/**
|
|
83
|
-
* @member - The label of the flavor asset
|
|
84
|
-
* @type {string}
|
|
85
|
-
*/
|
|
86
|
-
label: string;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @constructor
|
|
90
|
-
* @param {Object} data The json response
|
|
91
|
-
*/
|
|
92
|
-
constructor(data: any) {
|
|
93
|
-
this.id = data.id;
|
|
94
|
-
this.flavorParamsId = data.flavorParamsId;
|
|
95
|
-
this.fileExt = data.fileExt;
|
|
96
|
-
this.bitrate = data.bitrate;
|
|
97
|
-
this.width = data.width;
|
|
98
|
-
this.height = data.height;
|
|
99
|
-
this.id = data.id;
|
|
100
|
-
this.frameRate = data.frameRate;
|
|
101
|
-
this.isOriginal = data.isOriginal;
|
|
102
|
-
this.isWeb = data.isWeb;
|
|
103
|
-
this.containerFormat = data.containerFormat;
|
|
104
|
-
this.videoCodecId = data.videoCodecId;
|
|
105
|
-
this.status = data.status;
|
|
106
|
-
this.language = data.language;
|
|
107
|
-
this.label = data.label;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
import ServiceResult from '../../common/base-service-result';
|
|
3
|
-
import {KalturaMediaEntry} from './kaltura-media-entry';
|
|
4
|
-
|
|
5
|
-
export class KalturaMediaEntries extends ServiceResult {
|
|
6
|
-
/**
|
|
7
|
-
* @member - The entries
|
|
8
|
-
* @type {Array<KalturaMediaEntry>}
|
|
9
|
-
*/
|
|
10
|
-
entries: Array<KalturaMediaEntry>;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @constructor
|
|
14
|
-
* @param {Object} responseObj The json response
|
|
15
|
-
*/
|
|
16
|
-
constructor(responseObj: Object) {
|
|
17
|
-
super(responseObj);
|
|
18
|
-
if (!this.hasError) {
|
|
19
|
-
this.entries = [];
|
|
20
|
-
responseObj.map(entry => this.entries.push(new KalturaMediaEntry(entry)));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
export class KalturaMediaEntry {
|
|
3
|
-
static EntryType: {[entryType: string]: {value: number | string}} = {
|
|
4
|
-
AUTOMATIC: {value: -1},
|
|
5
|
-
EXTERNAL_MEDIA: {value: 'externalMedia.externalMedia'},
|
|
6
|
-
MEDIA_CLIP: {value: 1},
|
|
7
|
-
MIX: {value: 2},
|
|
8
|
-
PLAYLIST: {value: 5},
|
|
9
|
-
DATA: {value: 6},
|
|
10
|
-
LIVE_STREAM: {value: 7},
|
|
11
|
-
LIVE_CHANNEL: {value: 8},
|
|
12
|
-
DOCUMENT: {value: 10}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
static MediaType: {[mediaType: string]: {value: number}} = {
|
|
16
|
-
VIDEO: {value: 1},
|
|
17
|
-
IMAGE: {value: 2},
|
|
18
|
-
AUDIO: {value: 5},
|
|
19
|
-
LIVE_STREAM_FLASH: {value: 201},
|
|
20
|
-
LIVE_STREAM_WINDOWS_MEDIA: {value: 202},
|
|
21
|
-
LIVE_STREAM_REAL_MEDIA: {value: 203},
|
|
22
|
-
LIVE_STREAM_QUICK_TIME: {value: 204}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
static EntryStatus: {[status: string]: string | number} = {
|
|
26
|
-
ERROR_IMPORTING: -2,
|
|
27
|
-
ERROR_CONVERTING: -1,
|
|
28
|
-
SCAN_FAILURE: 'virusScan.ScanFailure',
|
|
29
|
-
IMPORT: 0,
|
|
30
|
-
INFECTED: 'virusScan.Infected',
|
|
31
|
-
PRECONVERT: 1,
|
|
32
|
-
READY: 2,
|
|
33
|
-
DELETED: 3,
|
|
34
|
-
PENDING: 4,
|
|
35
|
-
MODERATE: 5,
|
|
36
|
-
BLOCKED: 6,
|
|
37
|
-
NO_CONTENT: 7
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
static EntryModerationStatus: {[status: string]: number} = {
|
|
41
|
-
PENDING_MODERATION: 1,
|
|
42
|
-
APPROVED: 2,
|
|
43
|
-
REJECTED: 3,
|
|
44
|
-
FLAGGED_FOR_REVIEW: 4,
|
|
45
|
-
MODERATE: 5,
|
|
46
|
-
AUTO_APPROVED: 6
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @member - The entry id
|
|
51
|
-
* @type {string}
|
|
52
|
-
*/
|
|
53
|
-
id: string;
|
|
54
|
-
/**
|
|
55
|
-
* @member - The entry referenceId
|
|
56
|
-
* @type {string}
|
|
57
|
-
*/
|
|
58
|
-
referenceId: string;
|
|
59
|
-
/**
|
|
60
|
-
* @member - The entry externalSourceType
|
|
61
|
-
* @type {string}
|
|
62
|
-
*/
|
|
63
|
-
externalSourceType: string;
|
|
64
|
-
/**
|
|
65
|
-
* @member - Entry name (Min 1 chars)
|
|
66
|
-
* @type {string}
|
|
67
|
-
*/
|
|
68
|
-
name: string;
|
|
69
|
-
/**
|
|
70
|
-
* @member - Entry description
|
|
71
|
-
* @type {string}
|
|
72
|
-
*/
|
|
73
|
-
description: string;
|
|
74
|
-
/**
|
|
75
|
-
* @member - The URL used for playback. This is not the download URL.
|
|
76
|
-
* @type {string}
|
|
77
|
-
*/
|
|
78
|
-
dataUrl: string;
|
|
79
|
-
/**
|
|
80
|
-
* @member - Comma separated flavor params ids that exists for this media entry
|
|
81
|
-
* @type {string}
|
|
82
|
-
*/
|
|
83
|
-
flavorParamsIds: string;
|
|
84
|
-
/**
|
|
85
|
-
* @member - The entry duration
|
|
86
|
-
* @type {number}
|
|
87
|
-
*/
|
|
88
|
-
duration: number;
|
|
89
|
-
/**
|
|
90
|
-
* @member - The type of the entry, this is auto filled by the derived entry object
|
|
91
|
-
* @type {string | number}
|
|
92
|
-
*/
|
|
93
|
-
type: string | number;
|
|
94
|
-
/**
|
|
95
|
-
* @member - The type of the entry, this is auto filled by the derived entry object (Image, Audio etc.)
|
|
96
|
-
* @type {number}
|
|
97
|
-
*/
|
|
98
|
-
entryType: number;
|
|
99
|
-
/**
|
|
100
|
-
* @member - Entry poster image
|
|
101
|
-
* @type {string}
|
|
102
|
-
*/
|
|
103
|
-
poster: string;
|
|
104
|
-
/**
|
|
105
|
-
* @member - DVR status
|
|
106
|
-
* @type {number}
|
|
107
|
-
*/
|
|
108
|
-
dvrStatus: number;
|
|
109
|
-
/**
|
|
110
|
-
* @member - Entry tags
|
|
111
|
-
* @type {string}
|
|
112
|
-
*/
|
|
113
|
-
tags: string;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* @member - Entry status
|
|
117
|
-
* @type {number}
|
|
118
|
-
*/
|
|
119
|
-
status: number;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @constructor
|
|
123
|
-
* @param {Object} entry The json response
|
|
124
|
-
*/
|
|
125
|
-
constructor(entry: Object) {
|
|
126
|
-
this.id = entry.id;
|
|
127
|
-
this.referenceId = entry.referenceId;
|
|
128
|
-
this.externalSourceType = entry.externalSourceType;
|
|
129
|
-
this.name = entry.name;
|
|
130
|
-
this.description = entry.description;
|
|
131
|
-
this.dataUrl = entry.dataUrl;
|
|
132
|
-
this.type = entry.type;
|
|
133
|
-
this.entryType = entry.mediaType;
|
|
134
|
-
this.flavorParamsIds = entry.flavorParamsIds;
|
|
135
|
-
this.duration = entry.duration;
|
|
136
|
-
this.poster = entry.thumbnailUrl;
|
|
137
|
-
this.status = entry.status;
|
|
138
|
-
this.dvrStatus = entry.dvrStatus;
|
|
139
|
-
this.tags = entry.tags;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
import ServiceResult from '../../common/base-service-result';
|
|
3
|
-
import {KalturaMetadata} from './kaltura-metadata';
|
|
4
|
-
|
|
5
|
-
export class KalturaMetadataListResponse extends ServiceResult {
|
|
6
|
-
totalCount: number;
|
|
7
|
-
metas: Array<KalturaMetadata>;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @constructor
|
|
11
|
-
* @param {Object} responseObj The response
|
|
12
|
-
*/
|
|
13
|
-
constructor(responseObj: Object) {
|
|
14
|
-
super(responseObj);
|
|
15
|
-
if (!this.hasError) {
|
|
16
|
-
this.totalCount = responseObj.totalCount;
|
|
17
|
-
if (this.totalCount > 0) {
|
|
18
|
-
this.metas = [];
|
|
19
|
-
responseObj.objects.map(meta => this.metas.push(new KalturaMetadata(meta)));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
export class KalturaMetadata {
|
|
3
|
-
static ObjectType: {[type: string]: string | number} = {
|
|
4
|
-
AD_CUE_POINT: 'adCuePointMetadata.AdCuePoint',
|
|
5
|
-
ANNOTATION: 'annotationMetadata.Annotation',
|
|
6
|
-
CODE_CUE_POINT: 'codeCuePointMetadata.CodeCuePoint',
|
|
7
|
-
THUMB_CUE_POINT: 'thumbCuePointMetadata.thumbCuePoint',
|
|
8
|
-
ENTRY: 1,
|
|
9
|
-
CATEGORY: 2,
|
|
10
|
-
USER: 3,
|
|
11
|
-
PARTNER: 4,
|
|
12
|
-
DYNAMIC_OBJECT: 5
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
static Status: {[status: string]: number} = {
|
|
16
|
-
VALID: 1,
|
|
17
|
-
INVALID: 2,
|
|
18
|
-
DELETED: 3
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
id: number;
|
|
22
|
-
metadataProfileId: number;
|
|
23
|
-
metadataProfileVersion: number;
|
|
24
|
-
metadataObjectType: string | number;
|
|
25
|
-
objectId: string;
|
|
26
|
-
version: number;
|
|
27
|
-
created: Date;
|
|
28
|
-
updated: Date;
|
|
29
|
-
status: number;
|
|
30
|
-
xml: string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @constructor
|
|
34
|
-
* @param {Object} data The response
|
|
35
|
-
*/
|
|
36
|
-
constructor(data: Object) {
|
|
37
|
-
this.id = data.id;
|
|
38
|
-
this.metadataProfileId = data.metadataProfileId;
|
|
39
|
-
this.metadataProfileVersion = data.metadataProfileVersion;
|
|
40
|
-
this.metadataProfileId = data.metadataProfileId;
|
|
41
|
-
this.metadataObjectType = data.metadataObjectType;
|
|
42
|
-
this.objectId = data.objectId;
|
|
43
|
-
this.version = data.version;
|
|
44
|
-
this.created = new Date(0);
|
|
45
|
-
this.created.setUTCSeconds(data.createdAt);
|
|
46
|
-
this.updated = new Date(0);
|
|
47
|
-
this.updated.setUTCSeconds(data.updatedAt);
|
|
48
|
-
this.status = data.status;
|
|
49
|
-
this.xml = data.xml;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
import ServiceResult from '../../common/base-service-result';
|
|
3
|
-
import {KalturaAccessControlMessage} from '../../common/response-types/kaltura-access-control-message';
|
|
4
|
-
import {KalturaPlaybackSource} from './kaltura-playback-source';
|
|
5
|
-
import {KalturaAccessControlModifyRequestHostRegexAction} from './kaltura-access-control-modify-request-host-regex-action';
|
|
6
|
-
import {KalturaRuleAction} from './kaltura-rule-action';
|
|
7
|
-
import {KalturaFlavorAsset} from './kaltura-flavor-asset';
|
|
8
|
-
import {KalturaBumper} from './kaltura-bumper';
|
|
9
|
-
|
|
10
|
-
export class KalturaPlaybackContext extends ServiceResult {
|
|
11
|
-
/**
|
|
12
|
-
* @member - The playback sources
|
|
13
|
-
* @type {Array<KalturaPlaybackSource>}
|
|
14
|
-
*/
|
|
15
|
-
sources: Array<KalturaPlaybackSource> = [];
|
|
16
|
-
/**
|
|
17
|
-
* @member - Array of actions as received from the rules that invalidated
|
|
18
|
-
* @type {Array<KalturaRuleAction>}
|
|
19
|
-
*/
|
|
20
|
-
actions: Array<KalturaRuleAction> = [];
|
|
21
|
-
/**
|
|
22
|
-
* @member - Array of actions as received from the rules that invalidated
|
|
23
|
-
* @type {Array<KalturaAccessControlMessage>}
|
|
24
|
-
*/
|
|
25
|
-
messages: Array<KalturaAccessControlMessage> = [];
|
|
26
|
-
/**
|
|
27
|
-
* @member - The flavor assets
|
|
28
|
-
* @type {Array<KalturaFlavorAsset>}
|
|
29
|
-
*/
|
|
30
|
-
flavorAssets: Array<KalturaFlavorAsset> = [];
|
|
31
|
-
/**
|
|
32
|
-
* @member - The bumper data
|
|
33
|
-
* @type {Array<KalturaBumper>}
|
|
34
|
-
*/
|
|
35
|
-
bumperData: Array<KalturaBumper> = [];
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @constructor
|
|
39
|
-
* @param {Object} response The response
|
|
40
|
-
*/
|
|
41
|
-
constructor(response: Object) {
|
|
42
|
-
super(response);
|
|
43
|
-
if (!this.hasError) {
|
|
44
|
-
const messages = response.messages;
|
|
45
|
-
if (messages) {
|
|
46
|
-
messages.map(message => this.messages.push(new KalturaAccessControlMessage(message)));
|
|
47
|
-
}
|
|
48
|
-
const actions = response.actions;
|
|
49
|
-
if (actions) {
|
|
50
|
-
actions.map(action => {
|
|
51
|
-
if (action.type === KalturaRuleAction.Type.REQUEST_HOST_REGEX) {
|
|
52
|
-
this.actions.push(new KalturaAccessControlModifyRequestHostRegexAction(action));
|
|
53
|
-
} else {
|
|
54
|
-
this.actions.push(new KalturaRuleAction(action));
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
const sources = response.sources;
|
|
59
|
-
if (sources) {
|
|
60
|
-
sources.map(source => this.sources.push(new KalturaPlaybackSource(source)));
|
|
61
|
-
}
|
|
62
|
-
const flavorAssets = response.flavorAssets;
|
|
63
|
-
if (flavorAssets) {
|
|
64
|
-
flavorAssets.map(flavor => this.flavorAssets.push(new KalturaFlavorAsset(flavor)));
|
|
65
|
-
}
|
|
66
|
-
const bumperData = response.bumperData;
|
|
67
|
-
if (bumperData) {
|
|
68
|
-
bumperData.map(bumper => this.bumperData.push(new KalturaBumper(bumper)));
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
hasBlockAction(): boolean {
|
|
74
|
-
return this.getBlockAction() !== undefined;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
getBlockAction(): ?KalturaRuleAction {
|
|
78
|
-
return this.actions.find(action => action.type === KalturaRuleAction.Type.BLOCK);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
getErrorMessages(): Array<KalturaAccessControlMessage> {
|
|
82
|
-
return this.messages;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Get the KalturaAccessControlModifyRequestHostRegexAction action
|
|
87
|
-
* @function getRequestHostRegexAction
|
|
88
|
-
* @returns {?KalturaAccessControlModifyRequestHostRegexAction} The action
|
|
89
|
-
* */
|
|
90
|
-
getRequestHostRegexAction(): ?KalturaAccessControlModifyRequestHostRegexAction {
|
|
91
|
-
const action = this.actions.find(action => action.type === KalturaRuleAction.Type.REQUEST_HOST_REGEX);
|
|
92
|
-
if (action instanceof KalturaAccessControlModifyRequestHostRegexAction) {
|
|
93
|
-
return action;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
import {KalturaDrmPlaybackPluginData} from '../../common/response-types/kaltura-drm-playback-plugin-data';
|
|
3
|
-
|
|
4
|
-
export type OVPKalturaPlaybackSource = KalturaPlaybackSource;
|
|
5
|
-
|
|
6
|
-
export class KalturaPlaybackSource {
|
|
7
|
-
/**
|
|
8
|
-
* @member - source format according to delivery profile streamer type (applehttp, mpegdash etc.)
|
|
9
|
-
* @type {string}
|
|
10
|
-
*/
|
|
11
|
-
format: string;
|
|
12
|
-
/**
|
|
13
|
-
* @member - delivery profile Id
|
|
14
|
-
* @type {string}
|
|
15
|
-
*/
|
|
16
|
-
deliveryProfileId: string;
|
|
17
|
-
/**
|
|
18
|
-
* @member - The source URL
|
|
19
|
-
* @type {string}
|
|
20
|
-
*/
|
|
21
|
-
url: string;
|
|
22
|
-
/**
|
|
23
|
-
* @member - comma separated string according to deliveryProfile media protocols ('http,https' etc.)
|
|
24
|
-
* @type {string}
|
|
25
|
-
*/
|
|
26
|
-
protocols: string;
|
|
27
|
-
/**
|
|
28
|
-
* @member - comma separated string of flavor ids
|
|
29
|
-
* @type {string}
|
|
30
|
-
*/
|
|
31
|
-
flavorIds: string;
|
|
32
|
-
/**
|
|
33
|
-
* @member - drm data object containing relevant license url ,scheme name and certificate
|
|
34
|
-
* @type {Array<KalturaDrmPlaybackPluginData>}
|
|
35
|
-
*/
|
|
36
|
-
drm: Array<KalturaDrmPlaybackPluginData> = [];
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @constructor
|
|
40
|
-
* @param {Object} source The response
|
|
41
|
-
*/
|
|
42
|
-
constructor(source: Object) {
|
|
43
|
-
this.format = source.format;
|
|
44
|
-
this.deliveryProfileId = source.deliveryProfileId;
|
|
45
|
-
this.url = source.url;
|
|
46
|
-
this.protocols = source.protocols;
|
|
47
|
-
this.flavorIds = source.flavorIds;
|
|
48
|
-
if (source.drm) {
|
|
49
|
-
source.drm.map(drm => this.drm.push(new KalturaDrmPlaybackPluginData(drm)));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Checks if source has DRM data
|
|
55
|
-
* @function hasDrmData
|
|
56
|
-
* @returns {boolean} Is source has DRM
|
|
57
|
-
*/
|
|
58
|
-
hasDrmData(): boolean {
|
|
59
|
-
return this.drm && this.drm.length > 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Checks if source has flavor IDs
|
|
64
|
-
* @function hasFlavorIds
|
|
65
|
-
* @returns {boolean} Is source ha flavor IDs
|
|
66
|
-
*/
|
|
67
|
-
hasFlavorIds(): boolean {
|
|
68
|
-
return !!this.flavorIds && this.flavorIds.length > 0;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Returns source desired protocol if supported
|
|
73
|
-
* @param {string} protocol - the desired protocol for the source (base play url protocol)
|
|
74
|
-
* @returns {string} - protocol if protocol is in the protocols list - if not empty string returned
|
|
75
|
-
*/
|
|
76
|
-
getProtocol(protocol: string): string {
|
|
77
|
-
let returnValue: string = '';
|
|
78
|
-
if (this.protocols && this.protocols.length > 0) {
|
|
79
|
-
let protocolsArr: Array<string> = this.protocols.split(',');
|
|
80
|
-
protocolsArr.forEach(p => {
|
|
81
|
-
if (p === protocol) {
|
|
82
|
-
returnValue = p;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
} else if (protocol === 'http') {
|
|
86
|
-
return protocol;
|
|
87
|
-
}
|
|
88
|
-
return returnValue;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
|
|
3
|
-
export class KalturaPlaylist {
|
|
4
|
-
/**
|
|
5
|
-
* @member - playlist id
|
|
6
|
-
* @type {string}
|
|
7
|
-
*/
|
|
8
|
-
id: string;
|
|
9
|
-
/**
|
|
10
|
-
* @member - playlist name
|
|
11
|
-
* @type {string}
|
|
12
|
-
*/
|
|
13
|
-
name: string;
|
|
14
|
-
/**
|
|
15
|
-
* @member - playlist description
|
|
16
|
-
* @type {string}
|
|
17
|
-
*/
|
|
18
|
-
description: string;
|
|
19
|
-
/**
|
|
20
|
-
* @member - playlist poster image
|
|
21
|
-
* @type {string}
|
|
22
|
-
*/
|
|
23
|
-
poster: string;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @constructor
|
|
27
|
-
* @param {Object} playlist - The json response
|
|
28
|
-
*/
|
|
29
|
-
constructor(playlist: Object) {
|
|
30
|
-
this.id = playlist.id;
|
|
31
|
-
this.name = playlist.name;
|
|
32
|
-
this.description = playlist.description;
|
|
33
|
-
this.poster = playlist.thumbnailUrl;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
export class KalturaRuleAction {
|
|
3
|
-
static Type: {[type: string]: string | number} = {
|
|
4
|
-
DRM_POLICY: 'drm.DRM_POLICY',
|
|
5
|
-
BLOCK: 1,
|
|
6
|
-
PREVIEW: 2,
|
|
7
|
-
LIMIT_FLAVORS: 3,
|
|
8
|
-
ADD_TO_STORAGE: 4,
|
|
9
|
-
LIMIT_DELIVERY_PROFILES: 5,
|
|
10
|
-
SERVE_FROM_REMOTE_SERVER: 6,
|
|
11
|
-
REQUEST_HOST_REGEX: 7,
|
|
12
|
-
LIMIT_THUMBNAIL_CAPTURE: 8
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @member - The type of the action
|
|
17
|
-
* @type {string|number}
|
|
18
|
-
*/
|
|
19
|
-
type: string | number;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @constructor
|
|
23
|
-
* @param {Object} data - The response
|
|
24
|
-
*/
|
|
25
|
-
constructor(data: Object) {
|
|
26
|
-
this.type = data.type;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
//@flow
|
|
2
|
-
import ServiceResult from '../../common/base-service-result';
|
|
3
|
-
|
|
4
|
-
export class KalturaUIConfResponse extends ServiceResult {
|
|
5
|
-
static Type: {[type: string]: number} = {
|
|
6
|
-
PLAYER: 1,
|
|
7
|
-
CONTRIBUTION_WIZARD: 2,
|
|
8
|
-
SIMPLE_EDITOR: 3,
|
|
9
|
-
ADVANCED_EDITOR: 4,
|
|
10
|
-
PLAYLIST: 5,
|
|
11
|
-
APP_STUDIO: 6,
|
|
12
|
-
KRECORD: 7,
|
|
13
|
-
PLAYER_V3: 8,
|
|
14
|
-
KMC_ACCOUNT: 9,
|
|
15
|
-
KMC_ANALYTICS: 10,
|
|
16
|
-
KMC_CONTENT: 11,
|
|
17
|
-
KMC_DASHBOARD: 12,
|
|
18
|
-
KMC_LOGIN: 13,
|
|
19
|
-
PLAYER_SL: 14,
|
|
20
|
-
CLIENTSIDE_ENCODER: 15,
|
|
21
|
-
KMC_GENERAL: 16,
|
|
22
|
-
KMC_ROLES_AND_PERMISSIONS: 17,
|
|
23
|
-
CLIPPER: 18,
|
|
24
|
-
KSR: 19,
|
|
25
|
-
KUPLOAD: 20,
|
|
26
|
-
WEBCASTING: 21
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
static CreationMode: {[mode: string]: number} = {
|
|
30
|
-
WIZARD: 2,
|
|
31
|
-
ADVANCED: 3
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
description: string;
|
|
35
|
-
objTypeAsString: string;
|
|
36
|
-
width: number;
|
|
37
|
-
height: number;
|
|
38
|
-
htmlParams: string;
|
|
39
|
-
swfUrl: string;
|
|
40
|
-
confFilePath: string;
|
|
41
|
-
confFile: string;
|
|
42
|
-
confFileFeatures: string;
|
|
43
|
-
name: string;
|
|
44
|
-
config: string;
|
|
45
|
-
confVars: string;
|
|
46
|
-
useCdn: boolean;
|
|
47
|
-
tags: string;
|
|
48
|
-
swfUrlVersion: string;
|
|
49
|
-
created: Date;
|
|
50
|
-
updated: Date;
|
|
51
|
-
html5Url: string;
|
|
52
|
-
version: string;
|
|
53
|
-
partnerTags: string;
|
|
54
|
-
objType: number;
|
|
55
|
-
creationMode: number;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @constructor
|
|
59
|
-
* @param {Object} data The json response
|
|
60
|
-
*/
|
|
61
|
-
constructor(data: Object) {
|
|
62
|
-
super(data);
|
|
63
|
-
if (!this.hasError) {
|
|
64
|
-
this.name = data.name;
|
|
65
|
-
this.description = data.description;
|
|
66
|
-
this.objTypeAsString = data.objTypeAsString;
|
|
67
|
-
this.width = data.width;
|
|
68
|
-
this.height = data.height;
|
|
69
|
-
this.htmlParams = data.htmlParams;
|
|
70
|
-
this.swfUrl = data.swfUrl;
|
|
71
|
-
this.confFilePath = data.confFilePath;
|
|
72
|
-
this.confFile = data.confFile;
|
|
73
|
-
this.confFileFeatures = data.confFileFeatures;
|
|
74
|
-
this.config = data.config;
|
|
75
|
-
this.confVars = data.confVars;
|
|
76
|
-
this.useCdn = data.useCdn;
|
|
77
|
-
this.tags = data.tags;
|
|
78
|
-
this.swfUrlVersion = data.swfUrlVersion;
|
|
79
|
-
this.created = new Date(0);
|
|
80
|
-
this.created.setUTCSeconds(data.createdAt);
|
|
81
|
-
this.updated = new Date(0);
|
|
82
|
-
this.updated.setUTCSeconds(data.updatedAt);
|
|
83
|
-
this.html5Url = data.description;
|
|
84
|
-
this.version = data.description;
|
|
85
|
-
this.partnerTags = data.description;
|
|
86
|
-
this.objType = data.description;
|
|
87
|
-
this.creationMode = data.description;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|