@eluvio/elv-client-js 3.2.39 → 3.2.41

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.
Files changed (32) hide show
  1. package/dist/ElvClient-min.js +6 -6
  2. package/dist/ElvClient-node-min.js +9 -9
  3. package/dist/ElvFrameClient-min.js +1 -1
  4. package/dist/ElvPermissionsClient-min.js +7 -7
  5. package/dist/ElvWalletClient-min.js +6 -6
  6. package/dist/ElvWalletClient-node-min.js +10 -10
  7. package/dist/src/AuthorizationClient.js +599 -507
  8. package/dist/src/Utils.js +2 -1
  9. package/dist/src/client/ABRPublishing.js +2 -2
  10. package/dist/src/client/ContentManagement.js +44 -5
  11. package/dist/src/walletClient/Notifications.js +191 -0
  12. package/dist/src/walletClient/Utils.js +16 -5
  13. package/dist/src/walletClient/index.js +1 -0
  14. package/package.json +1 -1
  15. package/src/AuthorizationClient.js +43 -0
  16. package/src/Utils.js +2 -2
  17. package/src/client/ABRPublishing.js +2 -2
  18. package/src/client/ContentManagement.js +28 -2
  19. package/src/walletClient/Notifications.js +109 -0
  20. package/src/walletClient/index.js +1 -0
  21. package/testScripts/CreateProductionMaster.js +14 -6
  22. package/testScripts/abr_profile_4k_clear_store_encrypted.json +111 -0
  23. package/testScripts/{abr_profile_4k_clear.json → abr_profile_4k_clear_store_unencrypted.json} +0 -0
  24. package/testScripts/abr_profile_clear_store_encrypted.json +1945 -0
  25. package/testScripts/{abr_profile_clear.json → abr_profile_clear_store_unencrypted.json} +0 -0
  26. package/utilities/ProductionMasterCreate.js +18 -6
  27. package/utilities/example_files/abr_profile_4k_clear_store_encrypted.json +111 -0
  28. package/utilities/example_files/{abr_profile_4k_clear.json → abr_profile_4k_clear_store_unencrypted.json} +0 -0
  29. package/utilities/example_files/abr_profile_clear_hls_only_store_encrypted.json +1892 -0
  30. package/utilities/example_files/{abr_profile_clear_hls_only.json → abr_profile_clear_hls_only_store_unencrypted.json} +0 -0
  31. package/utilities/example_files/abr_profile_clear_store_encrypted.json +1899 -0
  32. /package/utilities/example_files/{abr_profile_clear.json → abr_profile_clear_store_unencrypted.json} +0 -0
@@ -20,12 +20,16 @@ class ProductionMasterCreate extends Utility {
20
20
  return {
21
21
  concerns: [Client, CloudFile, LocalFile, ArgAssetMetadata, ArgMetadata, ContentType, ArgType],
22
22
  options: [
23
- StdOpt("libraryId",{demand: true, forX: "new production master"}),
24
- ModOpt("type",{demand: true, forX: "new production master"}),
23
+ StdOpt("libraryId", {demand: true, forX: "new production master"}),
24
+ ModOpt("type", {demand: true, forX: "new production master"}),
25
25
  ModOpt("metadata", {ofX: "production master object"}),
26
26
  ModOpt("title", {demand: true}),
27
27
  ModOpt("files", {forX: "for new production master"}),
28
- StdOpt("encrypt", {X: "uploaded files"}),
28
+ StdOpt("encrypt", {descTemplate: "DEPRECATED: uploaded/copied files will always be stored encrypted unless --unencrypted is specified."}),
29
+ NewOpt("unencrypted", {
30
+ descTemplate: "Store uploaded/copied files unencrypted",
31
+ type: "boolean"
32
+ }),
29
33
  NewOpt("streams", {
30
34
  descTemplate: "JSON string (or file path if prefixed with '@') containing stream specifications for variant in new production master",
31
35
  type: "string"
@@ -38,6 +42,10 @@ class ProductionMasterCreate extends Utility {
38
42
  const logger = this.logger;
39
43
  const J = this.concerns.JSON;
40
44
 
45
+ const {encrypt, unencrypted} = this.args;
46
+
47
+ if(encrypt && unencrypted) throw new Error("Cannot specify both --encrypt and --unencrypted");
48
+
41
49
  let access;
42
50
  if(this.args.s3Reference || this.args.s3Copy) {
43
51
  access = this.concerns.CloudFile.credentialSet();
@@ -53,7 +61,10 @@ class ProductionMasterCreate extends Utility {
53
61
  VariantModel(variant);
54
62
  }
55
63
 
56
- const newPublicMetadata = this.concerns.ArgAssetMetadata.publicMetadata({oldPublicMetadata: metadataFromArg.public, backupNameSuffix: "MASTER"});
64
+ const newPublicMetadata = this.concerns.ArgAssetMetadata.publicMetadata({
65
+ oldPublicMetadata: metadataFromArg.public,
66
+ backupNameSuffix: "MASTER"
67
+ });
57
68
  const metadata = R.mergeRight(metadataFromArg, {public: newPublicMetadata});
58
69
 
59
70
  let fileHandles = [];
@@ -66,7 +77,8 @@ class ProductionMasterCreate extends Utility {
66
77
  const client = await this.concerns.Client.get();
67
78
 
68
79
  const type = await await this.concerns.ArgType.typVersionHash();
69
- const {libraryId, encrypt, s3Copy, s3Reference} = this.args;
80
+ const {libraryId, s3Copy, s3Reference} = this.args;
81
+
70
82
 
71
83
  const createResponse = await client.CreateProductionMaster({
72
84
  libraryId,
@@ -75,7 +87,7 @@ class ProductionMasterCreate extends Utility {
75
87
  description: "Production Master for " + metadata.public.asset_metadata.title,
76
88
  metadata,
77
89
  fileInfo,
78
- encrypt,
90
+ encrypt: !unencrypted,
79
91
  access,
80
92
  copy: s3Copy && !s3Reference,
81
93
  callback: (access ? this.concerns.CloudFile : this.concerns.LocalFile).callback
@@ -0,0 +1,111 @@
1
+ {
2
+ "drm_optional": true,
3
+ "store_clear": false,
4
+ "ladder_specs": {
5
+ "{\"media_type\":\"audio\",\"channels\":1}": {
6
+ "rung_specs": [
7
+ {
8
+ "bit_rate": 128000,
9
+ "media_type": "audio",
10
+ "pregenerate": true
11
+ }
12
+ ]
13
+ },
14
+ "{\"media_type\":\"audio\",\"channels\":2}": {
15
+ "rung_specs": [
16
+ {
17
+ "bit_rate": 192000,
18
+ "media_type": "audio",
19
+ "pregenerate": true
20
+ }
21
+ ]
22
+ },
23
+ "{\"media_type\":\"audio\",\"channels\":6}": {
24
+ "rung_specs": [
25
+ {
26
+ "bit_rate": 384000,
27
+ "media_type": "audio",
28
+ "pregenerate": true
29
+ }
30
+ ]
31
+ },
32
+ "{\"media_type\":\"video\",\"aspect_ratio_height\":9,\"aspect_ratio_width\":16}": {
33
+ "rung_specs": [
34
+ {
35
+ "bit_rate": 20000000,
36
+ "height": 2160,
37
+ "media_type": "video",
38
+ "pregenerate": true,
39
+ "width": 3840
40
+ },
41
+ {
42
+ "bit_rate": 9500000,
43
+ "height": 1080,
44
+ "media_type": "video",
45
+ "pregenerate": false,
46
+ "width": 1920
47
+ },
48
+ {
49
+ "bit_rate": 4500000,
50
+ "height": 720,
51
+ "media_type": "video",
52
+ "pregenerate": false,
53
+ "width": 1280
54
+ },
55
+ {
56
+ "bit_rate": 2000000,
57
+ "height": 540,
58
+ "media_type": "video",
59
+ "pregenerate": false,
60
+ "width": 960
61
+ },
62
+ {
63
+ "bit_rate": 1100000,
64
+ "height": 432,
65
+ "media_type": "video",
66
+ "pregenerate": false,
67
+ "width": 768
68
+ },
69
+ {
70
+ "bit_rate": 810000,
71
+ "height": 360,
72
+ "media_type": "video",
73
+ "pregenerate": false,
74
+ "width": 640
75
+ },
76
+ {
77
+ "bit_rate": 520000,
78
+ "height": 360,
79
+ "media_type": "video",
80
+ "pregenerate": false,
81
+ "width": 640
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ "playout_formats": {
87
+ "dash-clear": {
88
+ "drm": null,
89
+ "protocol": {
90
+ "min_buffer_length": 2,
91
+ "type": "ProtoDash"
92
+ }
93
+ },
94
+ "hls-clear": {
95
+ "drm": null,
96
+ "protocol": {
97
+ "type": "ProtoHls"
98
+ }
99
+ }
100
+ },
101
+ "segment_specs": {
102
+ "audio": {
103
+ "segs_per_chunk": 15,
104
+ "target_dur": 2
105
+ },
106
+ "video": {
107
+ "segs_per_chunk": 15,
108
+ "target_dur": 2
109
+ }
110
+ }
111
+ }