@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playkit-js/playkit-js-downloads",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "main": "dist/playkit-downloads.js",
5
5
  "homepage": "https://github.com/kaltura/playkit-js-downloads#readme",
6
6
  "scripts": {
@@ -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
  }
@@ -6,7 +6,6 @@ interface DownloadConfig {
6
6
  displayFlavors: boolean;
7
7
  displayCaptions: boolean;
8
8
  displaySources: boolean;
9
- undisplayedAttachments: string[];
10
9
  }
11
10
 
12
11
  export {DownloadConfig};
package/webpack.config.js CHANGED
@@ -55,12 +55,7 @@ module.exports = {
55
55
  ]
56
56
  },
57
57
  devServer: {
58
- static: {
59
- directory: path.join(__dirname, 'demo')
60
- },
61
- client: {
62
- progress: true
63
- }
58
+ static: `${__dirname}/src`
64
59
  },
65
60
  resolve: {
66
61
  extensions: ['.tsx', '.ts', '.js'],
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>
package/demo/style.css DELETED
@@ -1,9 +0,0 @@
1
- body {
2
- background-color: #212121;
3
- }
4
-
5
- #player-placeholder {
6
- margin: 100px auto;
7
- max-width: 640px;
8
- aspect-ratio: 10 / 5.62;
9
- }