@pixwel/pixwel-sdk 1.1.6 → 1.1.7
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/coverage/clover.xml +3 -445
- package/coverage/coverage-final.json +1 -11
- package/coverage/lcov-report/Ingest.js.html +1 -1
- package/coverage/lcov-report/index.html +10 -140
- package/coverage/lcov.info +0 -916
- package/dist/src/Ingest.js +7 -4
- package/package.json +1 -1
- package/src/Ingest.js +8 -5
- package/test/Ingest.spec.js +1 -1
package/dist/src/Ingest.js
CHANGED
|
@@ -54,9 +54,12 @@ var Ingest = function () {
|
|
|
54
54
|
throw "missing info.File.track";
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
var general =
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
var general = void 0;
|
|
58
|
+
if (!Array.isArray(info['File']['track'])) {
|
|
59
|
+
general = info['File']['track'];
|
|
60
|
+
} else {
|
|
61
|
+
general = _lodash2.default.find(info['File']['track'], { _type: 'General' });
|
|
62
|
+
}
|
|
60
63
|
|
|
61
64
|
switch (mediaType) {
|
|
62
65
|
case 'video':
|
|
@@ -66,7 +69,7 @@ var Ingest = function () {
|
|
|
66
69
|
mediaType = 'Image';
|
|
67
70
|
break;
|
|
68
71
|
default:
|
|
69
|
-
if (general.Format == 'MXF') {
|
|
72
|
+
if (general.Format && general.Format == 'MXF') {
|
|
70
73
|
tags.Usage = 'broadcast';
|
|
71
74
|
}
|
|
72
75
|
return tags;
|
package/package.json
CHANGED
package/src/Ingest.js
CHANGED
|
@@ -33,10 +33,13 @@ export default class Ingest {
|
|
|
33
33
|
throw "missing info.File.track";
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
let general
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
let general;
|
|
37
|
+
if (!Array.isArray(info['File']['track'])) {
|
|
38
|
+
general = info['File']['track'];
|
|
39
|
+
} else {
|
|
40
|
+
general = _.find(info['File']['track'], { _type: 'General'});
|
|
41
|
+
}
|
|
42
|
+
|
|
40
43
|
switch (mediaType) {
|
|
41
44
|
case 'video':
|
|
42
45
|
mediaType = 'Video';
|
|
@@ -45,7 +48,7 @@ export default class Ingest {
|
|
|
45
48
|
mediaType = 'Image';
|
|
46
49
|
break;
|
|
47
50
|
default:
|
|
48
|
-
if (general.Format == 'MXF') {
|
|
51
|
+
if (general.Format && general.Format == 'MXF') {
|
|
49
52
|
tags.Usage = 'broadcast';
|
|
50
53
|
}
|
|
51
54
|
return tags;
|
package/test/Ingest.spec.js
CHANGED