@norskvideo/norsk-studio-built-ins 1.6.2 → 1.8.0

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 (101) hide show
  1. package/client/info.js +250 -980
  2. package/client/processor.audioLevel/styles.css +164 -0
  3. package/client/processor.audioMixer/styles.css +249 -0
  4. package/lib/info.js +21 -27
  5. package/lib/info.js.map +1 -1
  6. package/lib/input.srt-caller/runtime.d.ts +2 -2
  7. package/lib/input.srt-caller/runtime.js +26 -2
  8. package/lib/input.srt-caller/runtime.js.map +1 -1
  9. package/lib/input.udp-ts/runtime.js +1 -13
  10. package/lib/input.udp-ts/runtime.js.map +1 -1
  11. package/lib/output.autoCmaf/runtime.js +29 -4
  12. package/lib/output.autoCmaf/runtime.js.map +1 -1
  13. package/lib/output.preview/runtime.d.ts +19 -3
  14. package/lib/output.preview/runtime.js +51 -25
  15. package/lib/output.preview/runtime.js.map +1 -1
  16. package/lib/output.rtmp/runtime.js +6 -2
  17. package/lib/output.rtmp/runtime.js.map +1 -1
  18. package/lib/processor.actionReplay/info.d.ts +5 -0
  19. package/lib/processor.actionReplay/info.js +100 -0
  20. package/lib/processor.actionReplay/info.js.map +1 -0
  21. package/lib/processor.actionReplay/runtime.d.ts +59 -0
  22. package/lib/processor.actionReplay/runtime.js +224 -0
  23. package/lib/processor.actionReplay/runtime.js.map +1 -0
  24. package/lib/processor.actionReplay/summary.d.ts +7 -0
  25. package/lib/processor.actionReplay/summary.js +76 -0
  26. package/lib/processor.actionReplay/summary.js.map +1 -0
  27. package/lib/processor.audioLevel/info.d.ts +3 -0
  28. package/lib/processor.audioLevel/info.js +83 -0
  29. package/lib/processor.audioLevel/info.js.map +1 -0
  30. package/lib/processor.audioLevel/inline-view.d.ts +6 -0
  31. package/lib/processor.audioLevel/inline-view.js +23 -0
  32. package/lib/processor.audioLevel/inline-view.js.map +1 -0
  33. package/lib/processor.audioLevel/runtime.d.ts +49 -0
  34. package/lib/processor.audioLevel/runtime.js +82 -0
  35. package/lib/processor.audioLevel/runtime.js.map +1 -0
  36. package/lib/processor.audioLevel/summary-view.d.ts +7 -0
  37. package/lib/processor.audioLevel/summary-view.js +36 -0
  38. package/lib/processor.audioLevel/summary-view.js.map +1 -0
  39. package/lib/processor.audioMixer/fullscreen-view.d.ts +8 -0
  40. package/lib/processor.audioMixer/fullscreen-view.js +121 -0
  41. package/lib/processor.audioMixer/fullscreen-view.js.map +1 -0
  42. package/lib/processor.audioMixer/info.d.ts +4 -0
  43. package/lib/processor.audioMixer/info.js +148 -0
  44. package/lib/processor.audioMixer/info.js.map +1 -0
  45. package/lib/processor.audioMixer/inline-view.d.ts +7 -0
  46. package/lib/processor.audioMixer/inline-view.js +43 -0
  47. package/lib/processor.audioMixer/inline-view.js.map +1 -0
  48. package/lib/processor.audioMixer/runtime.d.ts +119 -0
  49. package/lib/processor.audioMixer/runtime.js +142 -0
  50. package/lib/processor.audioMixer/runtime.js.map +1 -0
  51. package/lib/processor.audioMixer/summary-view.d.ts +7 -0
  52. package/lib/processor.audioMixer/summary-view.js +11 -0
  53. package/lib/processor.audioMixer/summary-view.js.map +1 -0
  54. package/lib/processor.browserOverlay/runtime.d.ts +11 -7
  55. package/lib/processor.browserOverlay/runtime.js +83 -78
  56. package/lib/processor.browserOverlay/runtime.js.map +1 -1
  57. package/lib/processor.dynamicBug/runtime.d.ts +7 -3
  58. package/lib/processor.dynamicBug/runtime.js +94 -64
  59. package/lib/processor.dynamicBug/runtime.js.map +1 -1
  60. package/lib/processor.dynamicBug/summary-view.d.ts +2 -6
  61. package/lib/processor.dynamicBug/summary-view.js.map +1 -1
  62. package/lib/processor.fixedLadder/info.d.ts +6 -1
  63. package/lib/processor.fixedLadder/info.js +6 -1
  64. package/lib/processor.fixedLadder/info.js.map +1 -1
  65. package/lib/processor.fixedLadder/newFile.d.ts +3 -0
  66. package/lib/processor.fixedLadder/newFile.js +145 -0
  67. package/lib/processor.fixedLadder/newFile.js.map +1 -0
  68. package/lib/processor.monetise/info.d.ts +3 -0
  69. package/lib/processor.monetise/info.js +90 -0
  70. package/lib/processor.monetise/info.js.map +1 -0
  71. package/lib/processor.monetise/runtime.d.ts +57 -0
  72. package/lib/processor.monetise/runtime.js +141 -0
  73. package/lib/processor.monetise/runtime.js.map +1 -0
  74. package/lib/processor.monetise/summary.d.ts +7 -0
  75. package/lib/processor.monetise/summary.js +39 -0
  76. package/lib/processor.monetise/summary.js.map +1 -0
  77. package/lib/test/audio-mixer.d.ts +0 -0
  78. package/lib/test/audio-mixer.js +2 -0
  79. package/lib/test/audio-mixer.js.map +1 -0
  80. package/lib/test/auto-cmaf.js +198 -6
  81. package/lib/test/auto-cmaf.js.map +1 -1
  82. package/lib/test/browser-overlay.js +53 -0
  83. package/lib/test/browser-overlay.js.map +1 -1
  84. package/lib/test/dynamic-bug.d.ts +1 -0
  85. package/lib/test/dynamic-bug.js +313 -0
  86. package/lib/test/dynamic-bug.js.map +1 -0
  87. package/lib/test/fixed-ladder.d.ts +1 -0
  88. package/lib/test/fixed-ladder.js +125 -0
  89. package/lib/test/fixed-ladder.js.map +1 -1
  90. package/lib/test/preview.d.ts +1 -0
  91. package/lib/test/preview.js +112 -0
  92. package/lib/test/preview.js.map +1 -0
  93. package/lib/test/rtmp-input.js +62 -31
  94. package/lib/test/rtmp-input.js.map +1 -1
  95. package/lib/test/rtmp-output.js +18 -4
  96. package/lib/test/rtmp-output.js.map +1 -1
  97. package/lib/test/srt-input-caller.js +50 -0
  98. package/lib/test/srt-input-caller.js.map +1 -1
  99. package/lib/test/whep-output.js +52 -5
  100. package/lib/test/whep-output.js.map +1 -1
  101. package/package.json +3 -7
@@ -0,0 +1,164 @@
1
+ .audio-level-container {
2
+ height: 210px;
3
+ width: 200px;
4
+ grid-template-columns: 1fr 1fr;
5
+ grid-template-rows: 150px 40px 25px;
6
+ }
7
+
8
+ .audio-level-container-inline {
9
+ height: 108px;
10
+ width: 180px;
11
+ display: flex;
12
+ flex-direction: row-reverse;
13
+ }
14
+
15
+ .audio-level-container div {
16
+ float: left;
17
+ }
18
+
19
+ .preview-levels-inline {
20
+ height: 100%;
21
+ width: 30px;
22
+ background-color: #333;
23
+ border-radius: 2px;
24
+ display: flex;
25
+ grid-template-columns: 30px 30px;
26
+ padding: 4px 3px;
27
+ margin: auto;
28
+ margin-top: 0px;
29
+ grid-column-gap: 5px;
30
+ }
31
+
32
+ .preview-levels-summary {
33
+ height: 100%;
34
+ width: 30px;
35
+ background-color: #333;
36
+ border-radius: 2px;
37
+ display: grid;
38
+ grid-template-columns: 30px 30px;
39
+ padding: 4px 3px;
40
+ margin: auto;
41
+ margin-top: 0px;
42
+ grid-column-gap: 5px;
43
+ }
44
+
45
+ /* paint not glowing LEDs */
46
+ .preview-level {
47
+ position: relative;
48
+ margin: 0 2px;
49
+ flex-grow: 1;
50
+ z-index: 3;
51
+ background-color: transparent;
52
+ background-repeat: repeat-y;
53
+ background-image: linear-gradient(to bottom, #666 3px, transparent 1px);
54
+ background-size: 100% 4px;
55
+ }
56
+
57
+ /* paint glowing LEDs */
58
+ .preview-level:before {
59
+ width: 100%;
60
+ height: 100%;
61
+ content: ' ';
62
+ position: absolute;
63
+ top: 0px;
64
+ left: 0px;
65
+ z-index: 1;
66
+ background-repeat: no-repeat;
67
+ background-image: linear-gradient(to top, green 0%, yellow 80%, red 100%);
68
+ background-size: 100% 100%;
69
+ }
70
+
71
+ .clip-0:before {
72
+ clip-path: inset(0% 0 0 0);
73
+ -webkit-clip-path: inset(100% 0 0 0);
74
+ }
75
+
76
+ .clip-10:before {
77
+ clip-path: inset(10% 0 0 0);
78
+ -webkit-clip-path: inset(90% 0 0 0);
79
+ }
80
+
81
+ .clip-20:before {
82
+ clip-path: inset(80% 0 0 0);
83
+ -webkit-clip-path: inset(80% 0 0 0);
84
+ }
85
+
86
+ .clip-30:before {
87
+ clip-path: inset(70% 0 0 0);
88
+ -webkit-clip-path: inset(70% 0 0 0);
89
+ }
90
+
91
+ .clip-40:before {
92
+ clip-path: inset(60% 0 0 0);
93
+ -webkit-clip-path: inset(60% 0 0 0);
94
+ }
95
+
96
+ .clip-50:before {
97
+ clip-path: inset(50% 0 0 0);
98
+ -webkit-clip-path: inset(50% 0 0 0);
99
+ }
100
+
101
+ .clip-60:before {
102
+ clip-path: inset(40% 0 0 0);
103
+ -webkit-clip-path: inset(40% 0 0 0);
104
+ }
105
+
106
+ .clip-70:before {
107
+ clip-path: inset(30% 0 0 0);
108
+ -webkit-clip-path: inset(30% 0 0 0);
109
+ }
110
+
111
+
112
+ .clip-80:before {
113
+ clip-path: inset(20% 0 0 0);
114
+ -webkit-clip-path: inset(20% 0 0 0);
115
+ }
116
+
117
+ .clip-90:before {
118
+ clip-path: inset(10% 0 0 0);
119
+ -webkit-clip-path: inset(10% 0 0 0);
120
+ }
121
+
122
+ .clip-100:before {
123
+ clip-path: inset(0% 0 0 0);
124
+ -webkit-clip-path: inset(0% 0 0 0);
125
+ }
126
+
127
+
128
+
129
+ /* paint gap lines of LEDs */
130
+ .preview-level::after {
131
+ width: 100%;
132
+ height: 100%;
133
+ content: ' ';
134
+ position: absolute;
135
+ top: 0px;
136
+ left: 0px;
137
+ z-index: 2;
138
+ margin-top: 3px;
139
+ background-image: linear-gradient(to bottom, #333 1px
140
+ /* space between leds*/
141
+ , transparent 1px);
142
+ background-repeat: repeat-y;
143
+ background-size: 100% 4px;
144
+ /* 4px LED height */
145
+ background-color: transparent;
146
+ }
147
+
148
+ #audio-slider {
149
+ width: 150px;
150
+ }
151
+
152
+ #db-level-max {
153
+ right: 36px;
154
+ top: 0;
155
+ }
156
+
157
+ #db-level-min {
158
+ right: 23px;
159
+ bottom: 26px;
160
+ }
161
+
162
+ #node-gain-level {
163
+ align-self: end;
164
+ }
@@ -0,0 +1,249 @@
1
+ .audio-mixer {
2
+ height: 100%;
3
+ }
4
+
5
+ .channel-container {
6
+ height: 100%;
7
+ width: 150px;
8
+ grid-template-rows: 2em 35% 3em 1fr 2em;
9
+ grid-template-columns: 100px;
10
+ }
11
+
12
+ .mixer-level-db {
13
+ justify-content: space-evenly;
14
+ }
15
+
16
+ .mixer-gain-db {
17
+ height: calc(55vh - 15px);
18
+ right: -10px;
19
+ }
20
+
21
+ .mute-icon {
22
+ cursor: pointer;
23
+ }
24
+
25
+ .level-muted {
26
+ border: 2px solid;
27
+ border-color: #ff3366;
28
+ }
29
+
30
+ .audio-mixer-fader-container {
31
+ height: 55vh;
32
+ }
33
+
34
+ .audio-mixer-fader {
35
+ width: 55vh;
36
+ height: 1em;
37
+ }
38
+
39
+ .audio-level-container {
40
+ height: 210px;
41
+ width: 200px;
42
+ grid-template-columns: 1fr 1fr;
43
+ grid-template-rows: 150px 40px 25px;
44
+ }
45
+
46
+ .audio-level-container-inline {
47
+ height: 108px;
48
+ width: 180px;
49
+ display: flex;
50
+ flex-direction: row-reverse;
51
+ }
52
+
53
+ .audio-level-container div {
54
+ float: left;
55
+ }
56
+
57
+ .preview-levels-mixer {
58
+ width: 30px;
59
+ background-color: #333;
60
+ border-radius: 2px;
61
+ display: grid;
62
+ grid-template-columns: 30px 30px;
63
+ padding: 4px 3px;
64
+ margin: auto;
65
+ margin-top: 0px;
66
+ grid-column-gap: 5px;
67
+ height: 100%;
68
+ }
69
+
70
+ /* paint not glowing LEDs */
71
+ .preview-level-mixer {
72
+ position: relative;
73
+ margin: 0 2px;
74
+ flex-grow: 1;
75
+ z-index: 3;
76
+ background-color: transparent;
77
+ background-repeat: repeat-y;
78
+ background-image: linear-gradient(to bottom, #666 3px, transparent 1px);
79
+ background-size: 100% 4px;
80
+ }
81
+
82
+ /* paint glowing LEDs */
83
+ .preview-level-mixer:before {
84
+ width: 100%;
85
+ height: 100%;
86
+ content: ' ';
87
+ position: absolute;
88
+ top: 0px;
89
+ left: 0px;
90
+ z-index: 1;
91
+ background-repeat: no-repeat;
92
+ background-image: linear-gradient(to top, green 0%, yellow 80%, red 100%);
93
+ background-size: 100% 100%;
94
+ }
95
+
96
+ .clip-0:before {
97
+ clip-path: inset(0% 0 0 0);
98
+ -webkit-clip-path: inset(100% 0 0 0);
99
+ }
100
+
101
+ .clip-10:before {
102
+ clip-path: inset(10% 0 0 0);
103
+ -webkit-clip-path: inset(90% 0 0 0);
104
+ }
105
+
106
+ .clip-20:before {
107
+ clip-path: inset(80% 0 0 0);
108
+ -webkit-clip-path: inset(80% 0 0 0);
109
+ }
110
+
111
+ .clip-30:before {
112
+ clip-path: inset(70% 0 0 0);
113
+ -webkit-clip-path: inset(70% 0 0 0);
114
+ }
115
+
116
+ .clip-40:before {
117
+ clip-path: inset(60% 0 0 0);
118
+ -webkit-clip-path: inset(60% 0 0 0);
119
+ }
120
+
121
+ .clip-50:before {
122
+ clip-path: inset(50% 0 0 0);
123
+ -webkit-clip-path: inset(50% 0 0 0);
124
+ }
125
+
126
+ .clip-60:before {
127
+ clip-path: inset(40% 0 0 0);
128
+ -webkit-clip-path: inset(40% 0 0 0);
129
+ }
130
+
131
+ .clip-70:before {
132
+ clip-path: inset(30% 0 0 0);
133
+ -webkit-clip-path: inset(30% 0 0 0);
134
+ }
135
+
136
+
137
+ .clip-80:before {
138
+ clip-path: inset(20% 0 0 0);
139
+ -webkit-clip-path: inset(20% 0 0 0);
140
+ }
141
+
142
+ .clip-90:before {
143
+ clip-path: inset(10% 0 0 0);
144
+ -webkit-clip-path: inset(10% 0 0 0);
145
+ }
146
+
147
+ .clip-100:before {
148
+ clip-path: inset(0% 0 0 0);
149
+ -webkit-clip-path: inset(0% 0 0 0);
150
+ }
151
+
152
+
153
+
154
+ /* paint gap lines of LEDs */
155
+ .preview-level::after {
156
+ width: 100%;
157
+ height: 100%;
158
+ content: ' ';
159
+ position: absolute;
160
+ top: 0px;
161
+ left: 0px;
162
+ z-index: 2;
163
+ margin-top: 3px;
164
+ background-image: linear-gradient(to bottom, #333 1px
165
+ /* space between leds*/
166
+ , transparent 1px);
167
+ background-repeat: repeat-y;
168
+ background-size: 100% 4px;
169
+ /* 4px LED height */
170
+ background-color: transparent;
171
+ }
172
+
173
+ #audio-slider {
174
+ width: 150px;
175
+ }
176
+
177
+ #db-level-max {
178
+ right: 36px;
179
+ top: 0;
180
+ }
181
+
182
+ #db-level-min {
183
+ right: 23px;
184
+ bottom: 26px;
185
+ }
186
+
187
+ #node-gain-level {
188
+ align-self: end;
189
+ }
190
+
191
+ #mixer-level-container-inline {
192
+ grid-template-columns: 60px 60px 60px 60px;
193
+ grid-row-gap: 10px;
194
+ }
195
+
196
+ .preview-levels {
197
+ height: 100%;
198
+ width: 30px;
199
+ background-color: #333;
200
+ border-radius: 2px;
201
+ display: flex;
202
+ flex-direction: row;
203
+ padding: 4px 3px;
204
+ margin: auto;
205
+ margin-top: 0px;
206
+ writing-mode: vertical-rl;
207
+ }
208
+
209
+ /* paint not glowing LEDs */
210
+ .preview-level {
211
+ position: relative;
212
+ margin: 0 2px;
213
+ flex-grow: 1;
214
+ z-index: 3;
215
+ background-color: transparent;
216
+ background-repeat: repeat-y;
217
+ background-image: linear-gradient(to bottom, #666 3px, transparent 1px);
218
+ background-size: 100% 4px;
219
+ }
220
+
221
+ /* paint glowing LEDs */
222
+ .preview-level:before {
223
+ width: 100%;
224
+ height: 100%;
225
+ content: ' ';
226
+ position: absolute;
227
+ top: 0px;
228
+ left: 0px;
229
+ z-index: 1;
230
+ background-repeat: no-repeat;
231
+ background-image: linear-gradient(to top, green 0%, yellow 80%, red 100%);
232
+ background-size: 100% 100%;
233
+ }
234
+
235
+ .inline-channel-name {
236
+ left: 27px;
237
+ }
238
+
239
+ .inline-master-channel {
240
+ grid-row-start: 1;
241
+ grid-column-start: 4;
242
+ grid-row-end: 5;
243
+ height: 108px;
244
+ }
245
+
246
+ .inline-master-border {
247
+ border: 1px solid;
248
+ border-color: cyan;
249
+ }
package/lib/info.js CHANGED
@@ -17,52 +17,46 @@ function getNodeInfo(r, type) {
17
17
  return InitialisedComponents[type];
18
18
  }
19
19
  exports.default = getNodeInfo;
20
- const info_1 = __importDefault(require("./input.mediaconnect/info"));
20
+ const info_1 = __importDefault(require("./input.rtmp/info"));
21
21
  AllComponents.push((r) => (0, info_1.default)(r));
22
- const info_2 = __importDefault(require("./input.rtmp/info"));
22
+ const info_2 = __importDefault(require("./input.silence/info"));
23
23
  AllComponents.push((r) => (0, info_2.default)(r));
24
- const info_3 = __importDefault(require("./input.silence/info"));
24
+ const info_3 = __importDefault(require("./input.srt-caller/info"));
25
25
  AllComponents.push((r) => (0, info_3.default)(r));
26
- const info_4 = __importDefault(require("./input.srt-caller/info"));
26
+ const info_4 = __importDefault(require("./input.srt-listener/info"));
27
27
  AllComponents.push((r) => (0, info_4.default)(r));
28
- const info_5 = __importDefault(require("./input.srt-listener/info"));
28
+ const info_5 = __importDefault(require("./input.udp-ts/info"));
29
29
  AllComponents.push((r) => (0, info_5.default)(r));
30
- const info_6 = __importDefault(require("./input.udp-ts/info"));
30
+ const info_6 = __importDefault(require("./input.videoTestCard/info"));
31
31
  AllComponents.push((r) => (0, info_6.default)(r));
32
- const info_7 = __importDefault(require("./input.videoTestCard/info"));
32
+ const info_7 = __importDefault(require("./output.autoCmaf/info"));
33
33
  AllComponents.push((r) => (0, info_7.default)(r));
34
- const info_8 = __importDefault(require("./output.autoCmaf/info"));
34
+ const info_8 = __importDefault(require("./output.preview/info"));
35
35
  AllComponents.push((r) => (0, info_8.default)(r));
36
- const info_9 = __importDefault(require("./output.medialive/info"));
36
+ const info_9 = __importDefault(require("./output.rtmp/info"));
37
37
  AllComponents.push((r) => (0, info_9.default)(r));
38
- const info_10 = __importDefault(require("./output.preview/info"));
38
+ const info_10 = __importDefault(require("./output.srt/info"));
39
39
  AllComponents.push((r) => (0, info_10.default)(r));
40
- const info_11 = __importDefault(require("./output.rtmp/info"));
40
+ const info_11 = __importDefault(require("./output.statistics/info"));
41
41
  AllComponents.push((r) => (0, info_11.default)(r));
42
- const info_12 = __importDefault(require("./output.srt/info"));
42
+ const info_12 = __importDefault(require("./output.udpTs/info"));
43
43
  AllComponents.push((r) => (0, info_12.default)(r));
44
- const info_13 = __importDefault(require("./output.statistics/info"));
44
+ const info_13 = __importDefault(require("./output.whep/info"));
45
45
  AllComponents.push((r) => (0, info_13.default)(r));
46
- const info_14 = __importDefault(require("./output.udpTs/info"));
46
+ const info_14 = __importDefault(require("./processor.browserOverlay/info"));
47
47
  AllComponents.push((r) => (0, info_14.default)(r));
48
- const info_15 = __importDefault(require("./output.whep/info"));
48
+ const info_15 = __importDefault(require("./processor.cascadingSwitch/info"));
49
49
  AllComponents.push((r) => (0, info_15.default)(r));
50
- const info_16 = __importDefault(require("./processor.aws-transcribe/info"));
50
+ const info_16 = __importDefault(require("./processor.dynamicBug/info"));
51
51
  AllComponents.push((r) => (0, info_16.default)(r));
52
- const info_17 = __importDefault(require("./processor.browserOverlay/info"));
52
+ const info_17 = __importDefault(require("./processor.fixedLadder/info"));
53
53
  AllComponents.push((r) => (0, info_17.default)(r));
54
- const info_18 = __importDefault(require("./processor.cascadingSwitch/info"));
54
+ const info_18 = __importDefault(require("./processor.whisper-transcribe/info"));
55
55
  AllComponents.push((r) => (0, info_18.default)(r));
56
- const info_19 = __importDefault(require("./processor.dynamicBug/info"));
56
+ const info_19 = __importDefault(require("./util.latency/info"));
57
57
  AllComponents.push((r) => (0, info_19.default)(r));
58
- const info_20 = __importDefault(require("./processor.fixedLadder/info"));
58
+ const info_20 = __importDefault(require("./util.ma35d/info"));
59
59
  AllComponents.push((r) => (0, info_20.default)(r));
60
- const info_21 = __importDefault(require("./processor.whisper-transcribe/info"));
60
+ const info_21 = __importDefault(require("./util.timestamps/info"));
61
61
  AllComponents.push((r) => (0, info_21.default)(r));
62
- const info_22 = __importDefault(require("./util.latency/info"));
63
- AllComponents.push((r) => (0, info_22.default)(r));
64
- const info_23 = __importDefault(require("./util.ma35d/info"));
65
- AllComponents.push((r) => (0, info_23.default)(r));
66
- const info_24 = __importDefault(require("./util.timestamps/info"));
67
- AllComponents.push((r) => (0, info_24.default)(r));
68
62
  //# sourceMappingURL=info.js.map
package/lib/info.js.map C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AAoC,CAAC,CAAC;AAC5G,gEAA+C;AAC/C,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAY,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC5F,8DAA2C;AAC3C,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAU,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC1F,mEAAqD;AACrD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAe,EAAC,CAAC,CAAoC,CAAC,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import { Norsk, SrtInputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
2
2
  import { SocketOptions } from '../shared/srt-types';
3
3
  import { SimpleInputWrapper } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
4
- import { OnCreated, ServerComponentDefinition } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
4
+ import { OnCreated, ServerComponentDefinition, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
5
5
  export type SrtInputSettings = Pick<SdkSettings, 'port' | 'ip' | 'sourceName' | 'passphrase' | 'streamId'> & {
6
6
  id: string;
7
7
  displayName: string;
8
8
  socketOptions: SocketOptions;
9
9
  };
10
10
  export default class SrtInputDefinition implements ServerComponentDefinition<SrtInputSettings, SimpleInputWrapper> {
11
- create(norsk: Norsk, cfg: SrtInputSettings, cb: OnCreated<SimpleInputWrapper>): Promise<void>;
11
+ create(norsk: Norsk, cfg: SrtInputSettings, cb: OnCreated<SimpleInputWrapper>, runtime: StudioRuntime): Promise<void>;
12
12
  }
@@ -1,10 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
4
+ const util_1 = require("@norskvideo/norsk-studio/lib/shared/util");
4
5
  class SrtInputDefinition {
5
- async create(norsk, cfg, cb) {
6
+ async create(norsk, cfg, cb, runtime) {
7
+ runtime.updates.setAlert('disconnected', {
8
+ message: 'SRT Caller is not connected',
9
+ level: 'error'
10
+ });
6
11
  const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => {
7
- return await norsk.input.srt({ mode: 'caller', ...cfg });
12
+ return await norsk.input.srt({
13
+ mode: 'caller',
14
+ onConnection: () => {
15
+ runtime.updates.clearAlert('disconnected');
16
+ return { accept: true, sourceName: cfg.id };
17
+ },
18
+ onConnectionStatusChange(status, _sourceName) {
19
+ switch (status) {
20
+ case 'disconnected':
21
+ runtime.updates.setAlert('disconnected', {
22
+ message: 'SRT Caller got disconnected',
23
+ level: 'error'
24
+ });
25
+ break;
26
+ default:
27
+ (0, util_1.assertUnreachable)(status);
28
+ }
29
+ },
30
+ ...cfg
31
+ });
8
32
  });
9
33
  await wrapper.initialised;
10
34
  cb(wrapper);
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.srt-caller/runtime.ts"],"names":[],"mappings":";;AAEA,kFAAuF;AASvF,MAAqB,kBAAkB;IACrC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAqB,EAAE,EAAiC;QACjF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;YACxD,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,CAAC;IACd,CAAC;CACF;AARD,qCAQC"}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.srt-caller/runtime.ts"],"names":[],"mappings":";;AAEA,kFAAuF;AAEvF,mEAA6E;AAQ7E,MAAqB,kBAAkB;IACrC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAqB,EAAE,EAAiC,EAAE,OAAsB;QACzG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,EAAE;YACvC,OAAO,EAAE,6BAA6B;YACtC,KAAK,EAAE,OAAO;SACf,CAAC,CAAA;QACF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;YACxD,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;gBAC3B,IAAI,EAAE,QAAQ;gBACd,YAAY,EAAE,GAAG,EAAE;oBACjB,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;oBAC3C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,EAAE,CAAA;gBAC7C,CAAC;gBACD,wBAAwB,CAAC,MAAM,EAAE,WAAW;oBAC1C,QAAQ,MAAM,EAAE,CAAC;wBACf,KAAK,cAAc;4BACjB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,EAAE;gCACvC,OAAO,EAAE,6BAA6B;gCACtC,KAAK,EAAE,OAAO;6BACf,CAAC,CAAA;4BACF,MAAM;wBACR;4BACE,IAAA,wBAAiB,EAAC,MAAM,CAAC,CAAC;oBAE9B,CAAC;gBACH,CAAC;gBACD,GAAG,GAAG;aACP,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,CAAC;IACd,CAAC;CACF;AAhCD,qCAgCC"}
@@ -1,21 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
4
3
  const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
5
4
  class UdpTsInputDefinition {
6
5
  async create(norsk, cfg, cb) {
7
- const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => {
8
- const udp = await norsk.input.udpTs({ ...cfg });
9
- const align = await norsk.processor.transform.streamAlign({
10
- frameRate: { frames: 25, seconds: 1 },
11
- sampleRate: 96000,
12
- syncAv: true
13
- });
14
- align.subscribe([{
15
- source: udp, sourceSelector: norsk_sdk_1.selectAll
16
- }], norsk_sdk_1.requireAV);
17
- return align;
18
- });
6
+ const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => norsk.input.udpTs({ ...cfg }));
19
7
  await wrapper.initialised;
20
8
  cb(wrapper);
21
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.udp-ts/runtime.ts"],"names":[],"mappings":";;AAAA,qDAAuG;AACvG,kFAAuF;AAOvF,MAAqB,oBAAoB;IACvC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAuB,EAAE,EAAiC;QACnF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;YAExD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;YAGhD,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC;gBACxD,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;gBACrC,UAAU,EAAE,KAAK;gBACjB,MAAM,EAAE,IAAI;aACb,CAAC,CAAA;YACF,KAAK,CAAC,SAAS,CAAC,CAAC;oBACf,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,qBAAS;iBACvC,CAAC,EAAE,qBAAS,CAAC,CAAC;YAEf,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAA;QACF,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,CAAC;IACd,CAAC;CACF;AArBD,uCAqBC"}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.udp-ts/runtime.ts"],"names":[],"mappings":";;AACA,kFAAuF;AAOvF,MAAqB,oBAAoB;IACvC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAuB,EAAE,EAAiC;QACnF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE,CACxD,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,CAC9B,CAAA;QACD,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,CAAC;IACd,CAAC;CACF;AARD,uCAQC"}
@@ -4,6 +4,7 @@ exports.AutoCmaf = void 0;
4
4
  const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
5
5
  const util_1 = require("@norskvideo/norsk-studio/lib/shared/util");
6
6
  const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
7
+ const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
7
8
  class AutoCmafDefinition {
8
9
  async create(norsk, cfg, cb, { updates, report }) {
9
10
  const node = await AutoCmaf.create(norsk, cfg, report);
@@ -241,22 +242,46 @@ class AutoCmaf extends base_nodes_1.CustomSinkNode {
241
242
  (0, util_1.assertUnreachable)(stream.metadata.message);
242
243
  }
243
244
  });
245
+ const deletions = this.currentMedia.filter((x) => {
246
+ const stillExists = streams.find((y) => (0, norsk_sdk_1.streamKeysAreEqual)(y.key, x.key));
247
+ if (stillExists)
248
+ return false;
249
+ return true;
250
+ });
251
+ for (const deletion of deletions) {
252
+ const node = deletion?.node;
253
+ deletion.node = undefined;
254
+ await node?.close();
255
+ this.currentMedia = this.currentMedia.filter((x) => !(0, norsk_sdk_1.streamKeysAreEqual)(x.key, deletion.key));
256
+ }
244
257
  const thisResponse = this.pendingResponses.shift();
245
258
  if (this.pendingResponses.length > 0) {
246
259
  await this.popContextStack();
247
260
  }
248
261
  await Promise.all(creations);
249
- this.mv?.subscribe(this.currentMedia.flatMap((m) => {
262
+ const defaultSources = this.currentMedia.flatMap((m) => {
250
263
  if (m.key.programNumber == this.defaultProgramNumber && m.key.sourceName == this.defaultSourceName && m.node)
251
264
  return [{ source: m.node, sourceSelector: norsk_sdk_1.selectPlaylist }];
252
265
  return [];
253
- }));
266
+ });
267
+ if (defaultSources.length == 0 && this.defaultSourceName != '') {
268
+ (0, logging_1.infolog)("Resetting default multivariant because there are no streams");
269
+ this.defaultProgramNumber = 0;
270
+ this.defaultSourceName = '';
271
+ }
272
+ this.mv?.subscribe(defaultSources);
254
273
  for (const mv of this.currentMultiVariants) {
255
- mv.node?.subscribe(this.currentMedia.flatMap((m) => {
274
+ const sources = this.currentMedia.flatMap((m) => {
256
275
  if (m.key.programNumber == mv.programNumber && m.key.sourceName == mv.sourceName && m.node)
257
276
  return [{ source: m.node, sourceSelector: norsk_sdk_1.selectPlaylist }];
258
277
  return [];
259
- }));
278
+ });
279
+ if (sources.length == 0) {
280
+ (0, logging_1.infolog)("Removing multi-variant because all streams have gone");
281
+ await mv.node?.close();
282
+ this.currentMultiVariants = this.currentMultiVariants.filter((m) => m != mv);
283
+ }
284
+ mv.node?.subscribe(sources);
260
285
  }
261
286
  await Promise.all(subscribes);
262
287
  if (thisResponse)