@playkit-js/playkit-js-downloads 1.2.0 → 1.2.1
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 +2 -0
- package/dist/playkit-downloads.js +1 -1
- package/dist/playkit-downloads.js.map +1 -1
- package/package.json +1 -1
- package/src/download-plugin-manager.tsx +0 -6
- package/src/download.tsx +1 -2
- package/src/providers/response-types/kaltura-attachment-asset.ts +0 -10
- package/src/types/download-config.ts +0 -1
- package/webpack.config.js +1 -6
- package/demo/index.html +0 -45
- package/demo/style.css +0 -9
package/package.json
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {KalturaAttachmentAsset} from './providers';
|
|
2
|
-
|
|
3
1
|
const {Icon} = KalturaPlayer.ui.components;
|
|
4
2
|
|
|
5
3
|
import {Download} from './download';
|
|
@@ -25,10 +23,6 @@ class DownloadPluginManager extends KalturaPlayer.core.FakeEventTarget {
|
|
|
25
23
|
|
|
26
24
|
if (!this.downloadMetadata) {
|
|
27
25
|
this.downloadPlugin.logger.debug('Failed to get download url headers');
|
|
28
|
-
} else {
|
|
29
|
-
this.downloadMetadata.attachments = this.downloadMetadata.attachments.filter(
|
|
30
|
-
(attachment: KalturaAttachmentAsset): boolean => !this.downloadPlugin.config.undisplayedAttachments.includes(attachment.objectType)
|
|
31
|
-
);
|
|
32
26
|
}
|
|
33
27
|
}
|
|
34
28
|
return this.downloadMetadata;
|
package/src/download.tsx
CHANGED
|
@@ -23,8 +23,7 @@ class Download extends KalturaPlayer.core.BasePlugin {
|
|
|
23
23
|
displayAttachments: true,
|
|
24
24
|
displayFlavors: true,
|
|
25
25
|
displayCaptions: true,
|
|
26
|
-
displaySources: true
|
|
27
|
-
undisplayedAttachments: ['KalturaTranscriptAsset']
|
|
26
|
+
displaySources: true
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
private iconId = -1;
|
|
@@ -3,14 +3,6 @@ export interface KalturaAttachmentAssetArgs {
|
|
|
3
3
|
filename: string;
|
|
4
4
|
fileExt: string;
|
|
5
5
|
title: string;
|
|
6
|
-
objectType: string;
|
|
7
|
-
size: number;
|
|
8
|
-
version: number;
|
|
9
|
-
tags: string;
|
|
10
|
-
status: number;
|
|
11
|
-
format: string;
|
|
12
|
-
createdAt: number;
|
|
13
|
-
updatedAt: number;
|
|
14
6
|
}
|
|
15
7
|
|
|
16
8
|
export class KalturaAttachmentAsset {
|
|
@@ -19,7 +11,6 @@ export class KalturaAttachmentAsset {
|
|
|
19
11
|
fileExt: string;
|
|
20
12
|
downloadUrl: string;
|
|
21
13
|
title: string;
|
|
22
|
-
objectType: string;
|
|
23
14
|
|
|
24
15
|
constructor(attachmentAsset: KalturaAttachmentAssetArgs) {
|
|
25
16
|
this.id = attachmentAsset.id;
|
|
@@ -27,6 +18,5 @@ export class KalturaAttachmentAsset {
|
|
|
27
18
|
this.fileExt = attachmentAsset.fileExt;
|
|
28
19
|
this.downloadUrl = '';
|
|
29
20
|
this.title = attachmentAsset.title;
|
|
30
|
-
this.objectType = attachmentAsset.objectType;
|
|
31
21
|
}
|
|
32
22
|
}
|
package/webpack.config.js
CHANGED
package/demo/index.html
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<meta name="theme-color" content="#000000" />
|
|
7
|
-
<meta name="description" content="Kaltura Player Demo Page" />
|
|
8
|
-
<title>Download Plugin</title>
|
|
9
|
-
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
10
|
-
<script src="https://unpkg.com/@playkit-js/kaltura-player-js@canary/dist/kaltura-ovp-player.js"></script>
|
|
11
|
-
<script src="https://unpkg.com/@playkit-js/ui-managers@canary/dist/playkit-ui-managers.js" type="text/javascript"></script>
|
|
12
|
-
<script src="./playkit-downloads.js" type="text/javascript"></script>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="player-placeholder"></div>
|
|
16
|
-
<script type="text/javascript">
|
|
17
|
-
const config = {
|
|
18
|
-
log: {
|
|
19
|
-
level: 'DEBUG'
|
|
20
|
-
},
|
|
21
|
-
targetId: 'player-placeholder',
|
|
22
|
-
provider: {
|
|
23
|
-
"env": {
|
|
24
|
-
"serviceUrl": "https://cdnapisec.kaltura.com/api_v3",
|
|
25
|
-
"cdnUrl": "https://cfvod.kaltura.com",
|
|
26
|
-
"statsServiceUrl": "https://stats.kaltura.com",
|
|
27
|
-
"liveStatsServiceUrl": "https://livestats.kaltura.com",
|
|
28
|
-
"analyticsServiceUrl": "https://analytics.kaltura.com",
|
|
29
|
-
"apiFeatures": {
|
|
30
|
-
"entryRedirect": "1"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"partnerId": 3076893,
|
|
34
|
-
},
|
|
35
|
-
plugins: {
|
|
36
|
-
uiManagers: {},
|
|
37
|
-
download: {}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const player = KalturaPlayer.setup(config);
|
|
42
|
-
player.loadMedia({entryId: '1_rhur4p1n'});
|
|
43
|
-
</script>
|
|
44
|
-
</body>
|
|
45
|
-
</html>
|