@norskvideo/norsk-studio-built-ins 1.0.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 (332) hide show
  1. package/client/info.js +17990 -0
  2. package/client/output.preview/styles.css +128 -0
  3. package/client/processor.audioLevel/styles.css +164 -0
  4. package/client/processor.audioMixer/styles.css +249 -0
  5. package/client/processor.cascadingSwitch/extra.css +0 -0
  6. package/lib/index.d.ts +3 -0
  7. package/lib/index.js +15 -0
  8. package/lib/index.js.map +1 -0
  9. package/lib/info.d.ts +3 -0
  10. package/lib/info.js +74 -0
  11. package/lib/info.js.map +1 -0
  12. package/lib/input.mediaconnect/flow-selection.d.ts +9 -0
  13. package/lib/input.mediaconnect/flow-selection.js +40 -0
  14. package/lib/input.mediaconnect/flow-selection.js.map +1 -0
  15. package/lib/input.mediaconnect/info.d.ts +3 -0
  16. package/lib/input.mediaconnect/info.js +70 -0
  17. package/lib/input.mediaconnect/info.js.map +1 -0
  18. package/lib/input.mediaconnect/node-view.d.ts +6 -0
  19. package/lib/input.mediaconnect/node-view.js +38 -0
  20. package/lib/input.mediaconnect/node-view.js.map +1 -0
  21. package/lib/input.mediaconnect/output-selection.d.ts +9 -0
  22. package/lib/input.mediaconnect/output-selection.js +55 -0
  23. package/lib/input.mediaconnect/output-selection.js.map +1 -0
  24. package/lib/input.mediaconnect/runtime.d.ts +23 -0
  25. package/lib/input.mediaconnect/runtime.js +133 -0
  26. package/lib/input.mediaconnect/runtime.js.map +1 -0
  27. package/lib/input.rtmp/info.d.ts +3 -0
  28. package/lib/input.rtmp/info.js +101 -0
  29. package/lib/input.rtmp/info.js.map +1 -0
  30. package/lib/input.rtmp/inline-view.d.ts +6 -0
  31. package/lib/input.rtmp/inline-view.js +16 -0
  32. package/lib/input.rtmp/inline-view.js.map +1 -0
  33. package/lib/input.rtmp/runtime.d.ts +19 -0
  34. package/lib/input.rtmp/runtime.js +75 -0
  35. package/lib/input.rtmp/runtime.js.map +1 -0
  36. package/lib/input.rtmp/summary-view.d.ts +6 -0
  37. package/lib/input.rtmp/summary-view.js +22 -0
  38. package/lib/input.rtmp/summary-view.js.map +1 -0
  39. package/lib/input.silence/info.d.ts +3 -0
  40. package/lib/input.silence/info.js +47 -0
  41. package/lib/input.silence/info.js.map +1 -0
  42. package/lib/input.silence/runtime.d.ts +22 -0
  43. package/lib/input.silence/runtime.js +52 -0
  44. package/lib/input.silence/runtime.js.map +1 -0
  45. package/lib/input.srt-caller/info.d.ts +3 -0
  46. package/lib/input.srt-caller/info.js +74 -0
  47. package/lib/input.srt-caller/info.js.map +1 -0
  48. package/lib/input.srt-caller/runtime.d.ts +12 -0
  49. package/lib/input.srt-caller/runtime.js +14 -0
  50. package/lib/input.srt-caller/runtime.js.map +1 -0
  51. package/lib/input.srt-listener/info.d.ts +3 -0
  52. package/lib/input.srt-listener/info.js +125 -0
  53. package/lib/input.srt-listener/info.js.map +1 -0
  54. package/lib/input.srt-listener/inline-view.d.ts +6 -0
  55. package/lib/input.srt-listener/inline-view.js +16 -0
  56. package/lib/input.srt-listener/inline-view.js.map +1 -0
  57. package/lib/input.srt-listener/runtime.d.ts +24 -0
  58. package/lib/input.srt-listener/runtime.js +75 -0
  59. package/lib/input.srt-listener/runtime.js.map +1 -0
  60. package/lib/input.srt-listener/summary-view.d.ts +6 -0
  61. package/lib/input.srt-listener/summary-view.js +22 -0
  62. package/lib/input.srt-listener/summary-view.js.map +1 -0
  63. package/lib/input.udp-ts/info.d.ts +3 -0
  64. package/lib/input.udp-ts/info.js +34 -0
  65. package/lib/input.udp-ts/info.js.map +1 -0
  66. package/lib/input.udp-ts/runtime.d.ts +10 -0
  67. package/lib/input.udp-ts/runtime.js +24 -0
  68. package/lib/input.udp-ts/runtime.js.map +1 -0
  69. package/lib/input.videoTestCard/info.d.ts +3 -0
  70. package/lib/input.videoTestCard/info.js +42 -0
  71. package/lib/input.videoTestCard/info.js.map +1 -0
  72. package/lib/input.videoTestCard/runtime.d.ts +10 -0
  73. package/lib/input.videoTestCard/runtime.js +14 -0
  74. package/lib/input.videoTestCard/runtime.js.map +1 -0
  75. package/lib/output.autoCmaf/form-views.d.ts +3 -0
  76. package/lib/output.autoCmaf/form-views.js +13 -0
  77. package/lib/output.autoCmaf/form-views.js.map +1 -0
  78. package/lib/output.autoCmaf/fullscreen.d.ts +6 -0
  79. package/lib/output.autoCmaf/fullscreen.js +31 -0
  80. package/lib/output.autoCmaf/fullscreen.js.map +1 -0
  81. package/lib/output.autoCmaf/info.d.ts +3 -0
  82. package/lib/output.autoCmaf/info.js +197 -0
  83. package/lib/output.autoCmaf/info.js.map +1 -0
  84. package/lib/output.autoCmaf/runtime.d.ts +66 -0
  85. package/lib/output.autoCmaf/runtime.js +285 -0
  86. package/lib/output.autoCmaf/runtime.js.map +1 -0
  87. package/lib/output.autoCmaf/summary.d.ts +6 -0
  88. package/lib/output.autoCmaf/summary.js +32 -0
  89. package/lib/output.autoCmaf/summary.js.map +1 -0
  90. package/lib/output.medialive/channel-selection.d.ts +9 -0
  91. package/lib/output.medialive/channel-selection.js +40 -0
  92. package/lib/output.medialive/channel-selection.js.map +1 -0
  93. package/lib/output.medialive/fullscreen.d.ts +6 -0
  94. package/lib/output.medialive/fullscreen.js +31 -0
  95. package/lib/output.medialive/fullscreen.js.map +1 -0
  96. package/lib/output.medialive/info.d.ts +3 -0
  97. package/lib/output.medialive/info.js +111 -0
  98. package/lib/output.medialive/info.js.map +1 -0
  99. package/lib/output.medialive/inline.d.ts +6 -0
  100. package/lib/output.medialive/inline.js +30 -0
  101. package/lib/output.medialive/inline.js.map +1 -0
  102. package/lib/output.medialive/input-selection.d.ts +9 -0
  103. package/lib/output.medialive/input-selection.js +58 -0
  104. package/lib/output.medialive/input-selection.js.map +1 -0
  105. package/lib/output.medialive/node-view.d.ts +6 -0
  106. package/lib/output.medialive/node-view.js +36 -0
  107. package/lib/output.medialive/node-view.js.map +1 -0
  108. package/lib/output.medialive/runtime.d.ts +34 -0
  109. package/lib/output.medialive/runtime.js +142 -0
  110. package/lib/output.medialive/runtime.js.map +1 -0
  111. package/lib/output.medialive/url-selection.d.ts +9 -0
  112. package/lib/output.medialive/url-selection.js +45 -0
  113. package/lib/output.medialive/url-selection.js.map +1 -0
  114. package/lib/output.preview/info.d.ts +5 -0
  115. package/lib/output.preview/info.js +103 -0
  116. package/lib/output.preview/info.js.map +1 -0
  117. package/lib/output.preview/inline-view.d.ts +6 -0
  118. package/lib/output.preview/inline-view.js +29 -0
  119. package/lib/output.preview/inline-view.js.map +1 -0
  120. package/lib/output.preview/runtime.d.ts +34 -0
  121. package/lib/output.preview/runtime.js +86 -0
  122. package/lib/output.preview/runtime.js.map +1 -0
  123. package/lib/output.rtmp/info.d.ts +3 -0
  124. package/lib/output.rtmp/info.js +76 -0
  125. package/lib/output.rtmp/info.js.map +1 -0
  126. package/lib/output.rtmp/inline-view.d.ts +6 -0
  127. package/lib/output.rtmp/inline-view.js +10 -0
  128. package/lib/output.rtmp/inline-view.js.map +1 -0
  129. package/lib/output.rtmp/runtime.d.ts +23 -0
  130. package/lib/output.rtmp/runtime.js +51 -0
  131. package/lib/output.rtmp/runtime.js.map +1 -0
  132. package/lib/output.srt/info.d.ts +3 -0
  133. package/lib/output.srt/info.js +102 -0
  134. package/lib/output.srt/info.js.map +1 -0
  135. package/lib/output.srt/runtime.d.ts +12 -0
  136. package/lib/output.srt/runtime.js +14 -0
  137. package/lib/output.srt/runtime.js.map +1 -0
  138. package/lib/output.statistics/info.d.ts +4 -0
  139. package/lib/output.statistics/info.js +69 -0
  140. package/lib/output.statistics/info.js.map +1 -0
  141. package/lib/output.statistics/inline-view.d.ts +6 -0
  142. package/lib/output.statistics/inline-view.js +32 -0
  143. package/lib/output.statistics/inline-view.js.map +1 -0
  144. package/lib/output.statistics/runtime.d.ts +18 -0
  145. package/lib/output.statistics/runtime.js +36 -0
  146. package/lib/output.statistics/runtime.js.map +1 -0
  147. package/lib/output.udpTs/info.d.ts +3 -0
  148. package/lib/output.udpTs/info.js +33 -0
  149. package/lib/output.udpTs/info.js.map +1 -0
  150. package/lib/output.udpTs/runtime.d.ts +10 -0
  151. package/lib/output.udpTs/runtime.js +14 -0
  152. package/lib/output.udpTs/runtime.js.map +1 -0
  153. package/lib/output.whep/info.d.ts +3 -0
  154. package/lib/output.whep/info.js +28 -0
  155. package/lib/output.whep/info.js.map +1 -0
  156. package/lib/output.whep/runtime.d.ts +14 -0
  157. package/lib/output.whep/runtime.js +21 -0
  158. package/lib/output.whep/runtime.js.map +1 -0
  159. package/lib/processor.actionReplay/info.d.ts +5 -0
  160. package/lib/processor.actionReplay/info.js +100 -0
  161. package/lib/processor.actionReplay/info.js.map +1 -0
  162. package/lib/processor.actionReplay/runtime.d.ts +59 -0
  163. package/lib/processor.actionReplay/runtime.js +224 -0
  164. package/lib/processor.actionReplay/runtime.js.map +1 -0
  165. package/lib/processor.actionReplay/summary.d.ts +7 -0
  166. package/lib/processor.actionReplay/summary.js +76 -0
  167. package/lib/processor.actionReplay/summary.js.map +1 -0
  168. package/lib/processor.audioLevel/info.d.ts +3 -0
  169. package/lib/processor.audioLevel/info.js +83 -0
  170. package/lib/processor.audioLevel/info.js.map +1 -0
  171. package/lib/processor.audioLevel/inline-view.d.ts +6 -0
  172. package/lib/processor.audioLevel/inline-view.js +23 -0
  173. package/lib/processor.audioLevel/inline-view.js.map +1 -0
  174. package/lib/processor.audioLevel/runtime.d.ts +49 -0
  175. package/lib/processor.audioLevel/runtime.js +82 -0
  176. package/lib/processor.audioLevel/runtime.js.map +1 -0
  177. package/lib/processor.audioLevel/summary-view.d.ts +7 -0
  178. package/lib/processor.audioLevel/summary-view.js +36 -0
  179. package/lib/processor.audioLevel/summary-view.js.map +1 -0
  180. package/lib/processor.audioMixer/fullscreen-view.d.ts +8 -0
  181. package/lib/processor.audioMixer/fullscreen-view.js +121 -0
  182. package/lib/processor.audioMixer/fullscreen-view.js.map +1 -0
  183. package/lib/processor.audioMixer/info.d.ts +4 -0
  184. package/lib/processor.audioMixer/info.js +148 -0
  185. package/lib/processor.audioMixer/info.js.map +1 -0
  186. package/lib/processor.audioMixer/inline-view.d.ts +7 -0
  187. package/lib/processor.audioMixer/inline-view.js +43 -0
  188. package/lib/processor.audioMixer/inline-view.js.map +1 -0
  189. package/lib/processor.audioMixer/runtime.d.ts +119 -0
  190. package/lib/processor.audioMixer/runtime.js +142 -0
  191. package/lib/processor.audioMixer/runtime.js.map +1 -0
  192. package/lib/processor.audioMixer/summary-view.d.ts +7 -0
  193. package/lib/processor.audioMixer/summary-view.js +11 -0
  194. package/lib/processor.audioMixer/summary-view.js.map +1 -0
  195. package/lib/processor.aws-transcribe/info.d.ts +3 -0
  196. package/lib/processor.aws-transcribe/info.js +81 -0
  197. package/lib/processor.aws-transcribe/info.js.map +1 -0
  198. package/lib/processor.aws-transcribe/runtime.d.ts +39 -0
  199. package/lib/processor.aws-transcribe/runtime.js +164 -0
  200. package/lib/processor.aws-transcribe/runtime.js.map +1 -0
  201. package/lib/processor.aws-transcribe/transcribe-language-selection.d.ts +9 -0
  202. package/lib/processor.aws-transcribe/transcribe-language-selection.js +40 -0
  203. package/lib/processor.aws-transcribe/transcribe-language-selection.js.map +1 -0
  204. package/lib/processor.aws-transcribe/translate-language-selection.d.ts +9 -0
  205. package/lib/processor.aws-transcribe/translate-language-selection.js +40 -0
  206. package/lib/processor.aws-transcribe/translate-language-selection.js.map +1 -0
  207. package/lib/processor.browserOverlay/info.d.ts +3 -0
  208. package/lib/processor.browserOverlay/info.js +38 -0
  209. package/lib/processor.browserOverlay/info.js.map +1 -0
  210. package/lib/processor.browserOverlay/runtime.d.ts +29 -0
  211. package/lib/processor.browserOverlay/runtime.js +121 -0
  212. package/lib/processor.browserOverlay/runtime.js.map +1 -0
  213. package/lib/processor.cascadingSwitch/info.d.ts +3 -0
  214. package/lib/processor.cascadingSwitch/info.js +155 -0
  215. package/lib/processor.cascadingSwitch/info.js.map +1 -0
  216. package/lib/processor.cascadingSwitch/inline-view.d.ts +6 -0
  217. package/lib/processor.cascadingSwitch/inline-view.js +15 -0
  218. package/lib/processor.cascadingSwitch/inline-view.js.map +1 -0
  219. package/lib/processor.cascadingSwitch/runtime.d.ts +59 -0
  220. package/lib/processor.cascadingSwitch/runtime.js +117 -0
  221. package/lib/processor.cascadingSwitch/runtime.js.map +1 -0
  222. package/lib/processor.cascadingSwitch/source-selection.d.ts +7 -0
  223. package/lib/processor.cascadingSwitch/source-selection.js +36 -0
  224. package/lib/processor.cascadingSwitch/source-selection.js.map +1 -0
  225. package/lib/processor.fixedLadder/info.d.ts +8 -0
  226. package/lib/processor.fixedLadder/info.js +71 -0
  227. package/lib/processor.fixedLadder/info.js.map +1 -0
  228. package/lib/processor.fixedLadder/runtime.d.ts +16 -0
  229. package/lib/processor.fixedLadder/runtime.js +165 -0
  230. package/lib/processor.fixedLadder/runtime.js.map +1 -0
  231. package/lib/processor.monetise/info.d.ts +3 -0
  232. package/lib/processor.monetise/info.js +90 -0
  233. package/lib/processor.monetise/info.js.map +1 -0
  234. package/lib/processor.monetise/runtime.d.ts +57 -0
  235. package/lib/processor.monetise/runtime.js +141 -0
  236. package/lib/processor.monetise/runtime.js.map +1 -0
  237. package/lib/processor.monetise/summary.d.ts +7 -0
  238. package/lib/processor.monetise/summary.js +39 -0
  239. package/lib/processor.monetise/summary.js.map +1 -0
  240. package/lib/processor.whisper-transcribe/info.d.ts +3 -0
  241. package/lib/processor.whisper-transcribe/info.js +43 -0
  242. package/lib/processor.whisper-transcribe/info.js.map +1 -0
  243. package/lib/processor.whisper-transcribe/runtime.d.ts +29 -0
  244. package/lib/processor.whisper-transcribe/runtime.js +83 -0
  245. package/lib/processor.whisper-transcribe/runtime.js.map +1 -0
  246. package/lib/shared/srt-form-views.d.ts +2 -0
  247. package/lib/shared/srt-form-views.js +10 -0
  248. package/lib/shared/srt-form-views.js.map +1 -0
  249. package/lib/shared/srt-socket-options.d.ts +4 -0
  250. package/lib/shared/srt-socket-options.js +36 -0
  251. package/lib/shared/srt-socket-options.js.map +1 -0
  252. package/lib/shared/srt-types.d.ts +2 -0
  253. package/lib/shared/srt-types.js +3 -0
  254. package/lib/shared/srt-types.js.map +1 -0
  255. package/lib/test/audio-mixer.d.ts +0 -0
  256. package/lib/test/audio-mixer.js +2 -0
  257. package/lib/test/audio-mixer.js.map +1 -0
  258. package/lib/test/auto-cmaf.d.ts +1 -0
  259. package/lib/test/auto-cmaf.js +142 -0
  260. package/lib/test/auto-cmaf.js.map +1 -0
  261. package/lib/test/browser-overlay.d.ts +1 -0
  262. package/lib/test/browser-overlay.js +79 -0
  263. package/lib/test/browser-overlay.js.map +1 -0
  264. package/lib/test/cascading-switch.d.ts +1 -0
  265. package/lib/test/cascading-switch.js +286 -0
  266. package/lib/test/cascading-switch.js.map +1 -0
  267. package/lib/test/fixed-ladder.d.ts +1 -0
  268. package/lib/test/fixed-ladder.js +100 -0
  269. package/lib/test/fixed-ladder.js.map +1 -0
  270. package/lib/test/rtmp-input.d.ts +1 -0
  271. package/lib/test/rtmp-input.js +182 -0
  272. package/lib/test/rtmp-input.js.map +1 -0
  273. package/lib/test/rtmp-output.d.ts +1 -0
  274. package/lib/test/rtmp-output.js +74 -0
  275. package/lib/test/rtmp-output.js.map +1 -0
  276. package/lib/test/silence-generator.d.ts +1 -0
  277. package/lib/test/silence-generator.js +65 -0
  278. package/lib/test/silence-generator.js.map +1 -0
  279. package/lib/test/srt-input-caller.d.ts +1 -0
  280. package/lib/test/srt-input-caller.js +79 -0
  281. package/lib/test/srt-input-caller.js.map +1 -0
  282. package/lib/test/srt-input-listener.d.ts +1 -0
  283. package/lib/test/srt-input-listener.js +382 -0
  284. package/lib/test/srt-input-listener.js.map +1 -0
  285. package/lib/test/srt-output.d.ts +1 -0
  286. package/lib/test/srt-output.js +78 -0
  287. package/lib/test/srt-output.js.map +1 -0
  288. package/lib/test/udp-output.d.ts +1 -0
  289. package/lib/test/udp-output.js +76 -0
  290. package/lib/test/udp-output.js.map +1 -0
  291. package/lib/test/udp-ts-input.d.ts +1 -0
  292. package/lib/test/udp-ts-input.js +78 -0
  293. package/lib/test/udp-ts-input.js.map +1 -0
  294. package/lib/test/video-card.d.ts +1 -0
  295. package/lib/test/video-card.js +68 -0
  296. package/lib/test/video-card.js.map +1 -0
  297. package/lib/test/whep-output.d.ts +1 -0
  298. package/lib/test/whep-output.js +92 -0
  299. package/lib/test/whep-output.js.map +1 -0
  300. package/lib/util.latency/info.d.ts +3 -0
  301. package/lib/util.latency/info.js +116 -0
  302. package/lib/util.latency/info.js.map +1 -0
  303. package/lib/util.latency/inline-view.d.ts +6 -0
  304. package/lib/util.latency/inline-view.js +74 -0
  305. package/lib/util.latency/inline-view.js.map +1 -0
  306. package/lib/util.latency/runtime.d.ts +19 -0
  307. package/lib/util.latency/runtime.js +87 -0
  308. package/lib/util.latency/runtime.js.map +1 -0
  309. package/lib/util.latency/source-node-selection.d.ts +9 -0
  310. package/lib/util.latency/source-node-selection.js +17 -0
  311. package/lib/util.latency/source-node-selection.js.map +1 -0
  312. package/lib/util.ma35d/info.d.ts +3 -0
  313. package/lib/util.ma35d/info.js +78 -0
  314. package/lib/util.ma35d/info.js.map +1 -0
  315. package/lib/util.ma35d/inline-view.d.ts +6 -0
  316. package/lib/util.ma35d/inline-view.js +76 -0
  317. package/lib/util.ma35d/inline-view.js.map +1 -0
  318. package/lib/util.ma35d/runtime.d.ts +21 -0
  319. package/lib/util.ma35d/runtime.js +49 -0
  320. package/lib/util.ma35d/runtime.js.map +1 -0
  321. package/lib/util.timestamps/info.d.ts +5 -0
  322. package/lib/util.timestamps/info.js +86 -0
  323. package/lib/util.timestamps/info.js.map +1 -0
  324. package/lib/util.timestamps/inline-view.d.ts +6 -0
  325. package/lib/util.timestamps/inline-view.js +94 -0
  326. package/lib/util.timestamps/inline-view.js.map +1 -0
  327. package/lib/util.timestamps/runtime.d.ts +29 -0
  328. package/lib/util.timestamps/runtime.js +40 -0
  329. package/lib/util.timestamps/runtime.js.map +1 -0
  330. package/package.json +61 -0
  331. package/shared/style.css +1617 -0
  332. package/shared/tailwind.css +31 -0
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const config_1 = require("@norskvideo/norsk-studio/lib/shared/config");
4
+ function default_1(R) {
5
+ const { defineComponent, Av, validation: { JitterBuffer }, } = R;
6
+ return defineComponent({
7
+ identifier: 'output.whep',
8
+ category: 'output',
9
+ name: "WHEP Egest",
10
+ subscription: {
11
+ accepts: {
12
+ type: 'single-stream',
13
+ media: Av
14
+ },
15
+ },
16
+ display: (_desc) => { return {}; },
17
+ configForm: {
18
+ global: {
19
+ iceServers: (0, config_1.GlobalIceServers)(R)
20
+ },
21
+ form: {
22
+ bufferDelayMs: { help: "How many milliseconds in the jitter buffer", hint: { type: 'numeric', validation: JitterBuffer, defaultValue: 500.0 } },
23
+ }
24
+ }
25
+ });
26
+ }
27
+ exports.default = default_1;
28
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/output.whep/info.ts"],"names":[],"mappings":";;AAGA,uEAA6E;AAE7E,mBAAwB,CAAe;IACrC,MAAM,EACJ,eAAe,EACf,EAAE,EACF,UAAU,EAAE,EAAE,YAAY,EAAE,GAC7B,GAAG,CAAC,CAAC;IACN,OAAO,eAAe,CAAqB;QACzC,UAAU,EAAE,aAAa;QACzB,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE;YAMZ,OAAO,EAAE;gBACP,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,EAAE;aACV;SACF;QACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;QAClC,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,UAAU,EAAE,IAAA,yBAAgB,EAAC,CAAC,CAAC;aAChC;YACD,IAAI,EAAE;gBACJ,aAAa,EAAE,EAAE,IAAI,EAAE,4CAA4C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE;aAChJ;SACF;KACF,CAAC,CAAC;AACL,CAAC;AA/BD,4BA+BC"}
@@ -0,0 +1,14 @@
1
+ import { Norsk, WhepOutputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
2
+ import { OnCreated, ServerComponentDefinition, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
3
+ import { SimpleSinkWrapper } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
4
+ export type WhepOutputSettings = {
5
+ id: string;
6
+ displayName: string;
7
+ bufferDelayMs?: SdkSettings['bufferDelayMs'];
8
+ __global: {
9
+ iceServers: string[];
10
+ };
11
+ };
12
+ export default class WhepOutputDefinition implements ServerComponentDefinition<WhepOutputSettings, SimpleSinkWrapper> {
13
+ create(norsk: Norsk, cfg: WhepOutputSettings, cb: OnCreated<SimpleSinkWrapper>, { report }: StudioRuntime): Promise<void>;
14
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
4
+ class WhepOutputDefinition {
5
+ async create(norsk, cfg, cb, { report }) {
6
+ const wrapper = new base_nodes_1.SimpleSinkWrapper(cfg.id, async () => {
7
+ const mappedCfg = {
8
+ id: cfg.id,
9
+ bufferDelayMs: cfg.bufferDelayMs,
10
+ iceServers: cfg.__global.iceServers.map((s) => ({ urls: [s] })),
11
+ };
12
+ const node = await norsk.output.whep(mappedCfg);
13
+ report.registerOutput(cfg.id, node.playerUrl);
14
+ return node;
15
+ });
16
+ await wrapper.initialised;
17
+ void cb(wrapper);
18
+ }
19
+ }
20
+ exports.default = WhepOutputDefinition;
21
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/output.whep/runtime.ts"],"names":[],"mappings":";;AAGA,kFAAsF;AAWtF,MAAqB,oBAAoB;IACvC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAuB,EAAE,EAAgC,EAAE,EAAE,MAAM,EAAiB;QAC7G,MAAM,OAAO,GAAG,IAAI,8BAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;YACvD,MAAM,SAAS,GAAgB;gBAC7B,EAAE,EAAE,GAAG,CAAC,EAAE;gBACV,aAAa,EAAE,GAAG,CAAC,aAAa;gBAChC,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;aAChE,CAAC;YACF,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAChD,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC9C,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACH,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CACF;AAfD,uCAeC"}
@@ -0,0 +1,5 @@
1
+ import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
2
+ import type { ActionReplayConfig, ActionReplayState, ActionReplayCommand, ActionReplayEvent } from "./runtime";
3
+ export default function ({ defineComponent, assertUnreachable, Av, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<ActionReplayConfig, ActionReplayState, ActionReplayCommand, ActionReplayEvent>;
4
+ export declare const hardwareNames: readonly ["quadra", "nvidia"];
5
+ export type HardwareName = typeof hardwareNames[number];
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.hardwareNames = void 0;
30
+ const react_1 = __importDefault(require("react"));
31
+ const config_1 = require("@norskvideo/norsk-studio/lib/shared/config");
32
+ function default_1({ defineComponent, assertUnreachable, Av, }) {
33
+ const SummaryView = react_1.default.lazy(async () => Promise.resolve().then(() => __importStar(require('./summary'))));
34
+ return defineComponent({
35
+ identifier: 'processor.transform.actionReplay',
36
+ category: 'processor',
37
+ name: "Action Replay",
38
+ subscription: {
39
+ accepts: {
40
+ type: 'single-stream',
41
+ media: Av
42
+ },
43
+ produces: {
44
+ type: 'single-stream',
45
+ media: Av
46
+ },
47
+ },
48
+ extraValidation: (ctx) => {
49
+ if (ctx.subscriptions.length == 0) {
50
+ return;
51
+ }
52
+ if (ctx.subscriptions.length > 1) {
53
+ ctx.addError("Action replay can only subscribe to a single source");
54
+ return;
55
+ }
56
+ if (!ctx.subscriptions[0].streams.select.includes("audio")) {
57
+ ctx.addError("Action replay requires audio in the subscription");
58
+ }
59
+ if (!ctx.subscriptions[0].streams.select.includes("video")) {
60
+ ctx.addError("Action replay requires video in the subscription");
61
+ }
62
+ },
63
+ runtime: {
64
+ summary: SummaryView,
65
+ initialState: () => ({
66
+ replaying: false,
67
+ contentPlayerUrl: undefined
68
+ }),
69
+ handleEvent: (ev, state) => {
70
+ const evType = ev.type;
71
+ switch (evType) {
72
+ case "content-player-created":
73
+ return { ...state, contentPlayerUrl: ev.url };
74
+ case "replay-started":
75
+ return { ...state, replaying: true };
76
+ case "replay-finished":
77
+ return { ...state, replaying: false };
78
+ default:
79
+ return assertUnreachable(evType);
80
+ }
81
+ }
82
+ },
83
+ display: (desc) => {
84
+ const { __global: _, ...rem } = desc.config;
85
+ return rem;
86
+ },
87
+ configForm: {
88
+ global: {
89
+ hardware: (0, config_1.HardwareSelection)()
90
+ },
91
+ form: {}
92
+ }
93
+ });
94
+ }
95
+ exports.default = default_1;
96
+ exports.hardwareNames = [
97
+ 'quadra',
98
+ 'nvidia'
99
+ ];
100
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/processor.actionReplay/info.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kDAA0B;AAC1B,uEAA+E;AAG/E,mBAAwB,EACtB,eAAe,EACf,iBAAiB,EACjB,EAAE,GACW;IACb,MAAM,WAAW,GAAG,eAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,mDAAQ,WAAW,GAAC,CAAC,CAAC;IAEhE,OAAO,eAAe,CAAgF;QACpG,UAAU,EAAE,kCAAkC;QAC9C,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,eAAe;QACrB,YAAY,EAAE;YACZ,OAAO,EAAE;gBACP,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,EAAE;aACV;YACD,QAAQ,EA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O,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;oBACvC;wBACE,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;gBACrC,CAAC;YACH,CAAC;SACF;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YAChB,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;YAC5C,OAAO,GAAG,CAAC;QACb,CAAC;QACD,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,QAAQ,EAAE,IAAA,0BAAiB,GAAE;aAC9B;YACD,IAAI,EAAE,EACL;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAlED,4BAkEC;AAEY,QAAA,aAAa,GAAG;IAC3B,QAAQ;IACR,QAAQ;CACA,CAAA"}
@@ -0,0 +1,59 @@
1
+ import { AudioEncodeNode, CmafAudioOutputNode, CmafMultiVariantOutputNode, CmafVideoOutputNode, FrameStorePlayerNode, FrameStoreRecorderNode, Norsk, SourceMediaNode, StreamKey, StreamMetadataOverrideNode, StreamSwitchSmoothNode, SubscriptionError } from '@norskvideo/norsk-sdk';
2
+ import { OnCreated, RelatedMediaNodes, RuntimeUpdates, ServerComponentDefinition, StudioNodeSubscriptionSource, StudioRuntime, StudioShared } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
3
+ import { SubscriptionOpts } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
4
+ import { HardwareAccelerationType } from '@norskvideo/norsk-studio/lib/shared/config';
5
+ export type ActionReplayConfig = {
6
+ id: string;
7
+ displayName: string;
8
+ __global: {
9
+ hardware?: HardwareAccelerationType;
10
+ };
11
+ };
12
+ export type ActionReplayState = {
13
+ contentPlayerUrl?: string;
14
+ replaying: boolean;
15
+ };
16
+ export type ActionReplayEvent = {
17
+ type: 'content-player-created';
18
+ url: string;
19
+ } | {
20
+ type: 'replay-started';
21
+ } | {
22
+ type: 'replay-finished';
23
+ };
24
+ export type ActionReplayCommand = {
25
+ type: 'do-replay';
26
+ from: number;
27
+ duration: number;
28
+ };
29
+ export default class ActionReplayDefinition implements ServerComponentDefinition<ActionReplayConfig, ActionReplay, ActionReplayState, ActionReplayCommand, ActionReplayEvent> {
30
+ create(norsk: Norsk, cfg: ActionReplayConfig, cb: OnCreated<ActionReplay>, runtime: StudioRuntime<ActionReplayState, ActionReplayEvent>): Promise<void>;
31
+ handleCommand(node: ActionReplay, command: ActionReplayCommand): void;
32
+ }
33
+ export declare class ActionReplay {
34
+ id: string;
35
+ norsk: Norsk;
36
+ cfg: ActionReplayConfig;
37
+ initialised: Promise<void>;
38
+ updates: RuntimeUpdates<ActionReplayState, ActionReplayEvent>;
39
+ shared: StudioShared;
40
+ relatedMediaNodes: RelatedMediaNodes;
41
+ smooth?: StreamSwitchSmoothNode<'source' | 'replay'>;
42
+ audioEncode?: AudioEncodeNode;
43
+ videoEncode?: SourceMediaNode;
44
+ audioCmaf?: CmafAudioOutputNode;
45
+ videoCmaf?: CmafVideoOutputNode;
46
+ mvCmaf?: CmafMultiVariantOutputNode;
47
+ writer?: FrameStoreRecorderNode;
48
+ reader?: FrameStorePlayerNode;
49
+ currentSource?: StudioNodeSubscriptionSource;
50
+ passthrough?: StreamMetadataOverrideNode;
51
+ audioStreamKey?: StreamKey;
52
+ videoStreamKey?: StreamKey;
53
+ constructor(norsk: Norsk, cfg: ActionReplayConfig, runtime: StudioRuntime<ActionReplayState, ActionReplayEvent>);
54
+ initialise(): Promise<void>;
55
+ subscribe(sources: StudioNodeSubscriptionSource[], _opts?: SubscriptionOpts | undefined): void;
56
+ replay(from: number, duration: number): Promise<void>;
57
+ sourceContextChange(_responseCallback: (error?: SubscriptionError) => void): Promise<boolean>;
58
+ teardown(): void;
59
+ }
@@ -0,0 +1,224 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionReplay = void 0;
4
+ const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
5
+ const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-types");
6
+ const util_1 = require("@norskvideo/norsk-studio/lib/shared/util");
7
+ const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
8
+ const os_1 = require("os");
9
+ const config_1 = require("@norskvideo/norsk-studio/lib/shared/config");
10
+ class ActionReplayDefinition {
11
+ async create(norsk, cfg, cb, runtime) {
12
+ const node = new ActionReplay(norsk, cfg, runtime);
13
+ await node.initialised;
14
+ cb(node);
15
+ }
16
+ handleCommand(node, command) {
17
+ const cmdType = command.type;
18
+ switch (cmdType) {
19
+ case 'do-replay':
20
+ void node.replay(command.from, command.duration);
21
+ break;
22
+ default:
23
+ (0, util_1.assertUnreachable)(cmdType);
24
+ }
25
+ }
26
+ }
27
+ exports.default = ActionReplayDefinition;
28
+ class ActionReplay {
29
+ id;
30
+ norsk;
31
+ cfg;
32
+ initialised;
33
+ updates;
34
+ shared;
35
+ relatedMediaNodes = new runtime_types_1.RelatedMediaNodes();
36
+ smooth;
37
+ audioEncode;
38
+ videoEncode;
39
+ audioCmaf;
40
+ videoCmaf;
41
+ mvCmaf;
42
+ writer;
43
+ reader;
44
+ currentSource;
45
+ passthrough;
46
+ audioStreamKey;
47
+ videoStreamKey;
48
+ constructor(norsk, cfg, runtime) {
49
+ this.id = cfg.id;
50
+ this.norsk = norsk;
51
+ this.cfg = cfg;
52
+ this.updates = runtime.updates;
53
+ this.shared = runtime.shared;
54
+ this.initialised = this.initialise();
55
+ }
56
+ async initialise() {
57
+ this.passthrough = await this.norsk.processor.transform.streamMetadataOverride({
58
+ id: `${this.id}-output`,
59
+ });
60
+ this.relatedMediaNodes.addOutput(this.passthrough);
61
+ }
62
+ subscribe(sources, _opts) {
63
+ this.currentSource = sources[0];
64
+ this.currentSource.registerForContextChange(this);
65
+ void this.sourceContextChange(() => { });
66
+ }
67
+ async replay(from, duration) {
68
+ if (this.reader) {
69
+ (0, logging_1.debuglog)("Multiple replay attempts started, ignoring", { from, duration });
70
+ return;
71
+ }
72
+ if (!this.smooth || !this.currentSource || !this.currentSource.source.relatedMediaNodes.output) {
73
+ (0, logging_1.errorlog)("Attempt to do replay before node is set up???", { from, duration });
74
+ return;
75
+ }
76
+ if (!this.audioStreamKey || !this.videoStreamKey) {
77
+ (0, logging_1.errorlog)("Attempt to do replay with no known stream keys", { from, duration });
78
+ return;
79
+ }
80
+ this.updates.raiseEvent({
81
+ type: 'replay-started'
82
+ });
83
+ const smooth = this.smooth;
84
+ const currentSource = this.currentSource;
85
+ this.reader = await this.norsk.input.frameStore({
86
+ id: `${this.id}-reader`,
87
+ name: `${this.id}-store`,
88
+ streamSelection: [
89
+ this.videoStreamKey,
90
+ this.audioStreamKey
91
+ ],
92
+ cuts: [{
93
+ durationMs: duration * 1000,
94
+ startDateTime: new Date((new Date()).getTime() - (from * 1000))
95
+ }],
96
+ trimPartialSegments: true,
97
+ sourceName: `${this.id}-cut`,
98
+ onCreate: (node) => {
99
+ smooth.subscribeToPins(currentSource.selectAvToPin("source").concat([
100
+ { source: node, sourceSelector: (0, norsk_sdk_1.avToPin)("replay") }
101
+ ]));
102
+ },
103
+ onClose: () => {
104
+ this.reader = undefined;
105
+ this.updates.raiseEvent({
106
+ type: 'replay-finished'
107
+ });
108
+ smooth.subscribeToPins(currentSource.selectAvToPin("source"));
109
+ }
110
+ });
111
+ }
112
+ async sourceContextChange(_responseCallback) {
113
+ if (!this.currentSource) {
114
+ this.teardown();
115
+ return false;
116
+ }
117
+ const latestStreams = this.currentSource?.latestStreams();
118
+ if (latestStreams.length < 2) {
119
+ this.teardown();
120
+ return false;
121
+ }
122
+ const video = latestStreams.find((s) => s.metadata.message.case == 'video');
123
+ const audio = latestStreams.find((s) => s.metadata.message.case == 'audio');
124
+ if (!video || !audio) {
125
+ this.teardown();
126
+ return false;
127
+ }
128
+ const videoMetadata = video.metadata.message.value;
129
+ const audioMetadata = audio.metadata.message.value;
130
+ this.audioStreamKey = audio.metadata.streamKey;
131
+ this.videoStreamKey = video.metadata.streamKey;
132
+ (0, logging_1.infolog)("Action replay node has a valid context, spinning up some nodes", { videoMetadata, audioMetadata });
133
+ this.smooth = await this.norsk.processor.control.streamSwitchSmooth({
134
+ id: `${this.id}-switch`,
135
+ outputSource: `${this.id}-source`,
136
+ outputResolution: { width: videoMetadata.width, height: videoMetadata.height },
137
+ frameRate: videoMetadata.frameRate ?? { frames: 25, seconds: 1 },
138
+ sampleRate: audioMetadata.sampleRate,
139
+ channelLayout: audioMetadata.channelLayout ?? 'stereo',
140
+ hardwareAcceleration: (0, config_1.contractHardwareAcceleration)(this.cfg.__global.hardware, ["quadra", "nvidia"]),
141
+ activeSource: 'source',
142
+ transitionDurationMs: 500.0,
143
+ onInboundContextChange: async (ctx) => {
144
+ if (ctx.get('replay')?.length == 2) {
145
+ this.smooth?.switchSource('replay');
146
+ }
147
+ else {
148
+ this.smooth?.switchSource('source');
149
+ }
150
+ }
151
+ });
152
+ this.relatedMediaNodes.addInput(this.smooth);
153
+ const dir = (0, os_1.tmpdir)();
154
+ this.writer = await this.norsk.output.frameStore({
155
+ id: `${this.id}-store`,
156
+ name: `${this.id}-store`,
157
+ path: dir,
158
+ chunkFileDurationSeconds: 60,
159
+ });
160
+ this.videoEncode = await this.shared.previewEncode(this.currentSource.selectStreams((0, norsk_sdk_1.selectExactKey)(this.videoStreamKey))[0], this.cfg.__global.hardware);
161
+ this.audioEncode = await this.norsk.processor.transform.audioEncode({
162
+ id: `${this.id}-audio-encode`,
163
+ channelLayout: 'stereo',
164
+ bitrate: 64000,
165
+ outputRenditionName: `${this.id}-preview`,
166
+ codec: {
167
+ kind: 'aac',
168
+ sampleRate: audioMetadata.sampleRate,
169
+ profile: 'lc'
170
+ }
171
+ });
172
+ const localDestination = {
173
+ id: `${this.id}-local`,
174
+ type: 'local',
175
+ retentionPeriodSeconds: 360
176
+ };
177
+ this.audioCmaf = await this.norsk.output.cmafAudio({
178
+ id: `${this.id}-cmaf-audio`,
179
+ segmentDurationSeconds: 2,
180
+ partDurationSeconds: 0.5,
181
+ destinations: [localDestination]
182
+ });
183
+ this.videoCmaf = await this.norsk.output.cmafVideo({
184
+ id: `${this.id}-cmaf-video`,
185
+ segmentDurationSeconds: 2,
186
+ partDurationSeconds: 0.5,
187
+ destinations: [localDestination]
188
+ });
189
+ this.mvCmaf = await this.norsk.output.cmafMultiVariant({
190
+ id: `${this.id}-cmaf-mv`,
191
+ playlistName: `${this.id}-mv`,
192
+ destinations: [localDestination]
193
+ });
194
+ this.smooth.subscribeToPins(this.currentSource.selectAvToPin("source"), (ctx) => {
195
+ if (ctx.streams.length == 2)
196
+ return 'accept';
197
+ return 'deny';
198
+ });
199
+ this.audioEncode.subscribe(this.currentSource.selectAudio());
200
+ this.audioCmaf.subscribe([
201
+ { source: this.audioEncode, sourceSelector: norsk_sdk_1.selectAudio }
202
+ ]);
203
+ this.videoCmaf.subscribe([
204
+ { source: this.videoEncode, sourceSelector: norsk_sdk_1.selectVideo }
205
+ ]);
206
+ this.mvCmaf.subscribe([
207
+ { source: this.audioCmaf, sourceSelector: norsk_sdk_1.selectPlaylist },
208
+ { source: this.videoCmaf, sourceSelector: norsk_sdk_1.selectPlaylist },
209
+ ]);
210
+ this.updates.raiseEvent({
211
+ type: 'content-player-created',
212
+ url: this.mvCmaf.url
213
+ });
214
+ this.passthrough?.subscribe([
215
+ { source: this.smooth, sourceSelector: norsk_sdk_1.selectAV }
216
+ ]);
217
+ this.writer.subscribe(this.currentSource.selectStreams());
218
+ return false;
219
+ }
220
+ teardown() {
221
+ }
222
+ }
223
+ exports.ActionReplay = ActionReplay;
224
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/processor.actionReplay/runtime.ts"],"names":[],"mappings":";;;AAAA,qDAG+B;AAE/B,wFAA0M;AAE1M,mEAA6E;AAC7E,yEAA0F;AAC1F,2BAA4B;AAC5B,uEAAoH;AA+BpH,MAAqB,sBAAsB;IACzC,KAAK,CAAC,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BAAwB;YAC9B,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;SACrB,CAAC,CAAA;QAEF,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;YAC1B,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,cAAc,EAAE,oBAAQ,EAAE;SAClD,CAAC,CAAA;QAGF,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC,CAAC;QAG1D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ;IAER,CAAC;CACF;AA/PD,oCA+PC"}
@@ -0,0 +1,7 @@
1
+ import type { ActionReplayState, ActionReplayConfig, ActionReplayCommand } from "./runtime";
2
+ declare function InlineView({ state, config, sendCommand }: {
3
+ state: ActionReplayState;
4
+ config: ActionReplayConfig;
5
+ sendCommand: (cmd: ActionReplayCommand) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export default InlineView;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
8
+ const hls_js_1 = __importDefault(require("hls.js"));
9
+ let changingDuration = false;
10
+ function InlineView({ state, config, sendCommand }) {
11
+ const url = state.contentPlayerUrl;
12
+ const id = config.id;
13
+ const previewVideo = (0, react_1.useRef)(null);
14
+ const [lastSeek, setLastSeek] = (0, react_1.useState)(undefined);
15
+ const [playbackDuration, setPlaybackDuration] = (0, react_1.useState)(10);
16
+ (0, react_1.useEffect)(() => {
17
+ if (!url)
18
+ return;
19
+ if (!previewVideo.current)
20
+ return;
21
+ if (hls_js_1.default.isSupported()) {
22
+ const hls = new hls_js_1.default();
23
+ hls.loadSource(url);
24
+ hls.attachMedia(previewVideo.current);
25
+ }
26
+ else if (previewVideo.current.canPlayType('application/vnd.apple.mpegurl')) {
27
+ previewVideo.current.src = url;
28
+ }
29
+ }, [state.contentPlayerUrl]);
30
+ if (!url)
31
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "..." });
32
+ return (0, jsx_runtime_1.jsxs)("div", { className: "mb-5", children: [(0, jsx_runtime_1.jsx)("h5", { children: "Preview" }), (0, jsx_runtime_1.jsx)("video", { ref: previewVideo, controls: true, onSeeked: onSeeked, autoPlay: true, muted: true, className: state.replaying ? "hidden" : "", id: `${id}-video` }), state.replaying ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Current Performing Replay" }) :
33
+ (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [lastSeek ?
34
+ (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("p", { children: ["Replay from ", lastSeek.time.toFixed(1), "(s) "] }), (0, jsx_runtime_1.jsxs)("p", { className: "block mb-2 text-sm font-medium text-gray-900 dark:text-white", children: ["Duration: ", playbackDuration, "s"] }), (0, jsx_runtime_1.jsx)("input", { id: "duration-range", type: "range", min: currentMinDuration(), max: currentMaxDuration(), defaultValue: playbackDuration, className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700", onChange: onDurationChange, onInput: onDurationChange })] })
35
+ :
36
+ (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), (0, jsx_runtime_1.jsx)("button", { onClick: sendReplayCommand, type: "button", className: "mt-2 mb-2 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800", children: "Replay" })] })] });
37
+ function sendReplayCommand() {
38
+ if (!previewVideo.current)
39
+ return;
40
+ if (!lastSeek)
41
+ return;
42
+ const fromHead = previewVideo.current.duration - lastSeek.time;
43
+ sendCommand({
44
+ type: "do-replay",
45
+ from: fromHead,
46
+ duration: playbackDuration
47
+ });
48
+ }
49
+ function onDurationChange(e) {
50
+ const v = parseInt(e.currentTarget.value, 10);
51
+ setPlaybackDuration(v);
52
+ }
53
+ function currentMinDuration() {
54
+ if (!previewVideo.current || !lastSeek)
55
+ return 10;
56
+ return Math.min(10, previewVideo.current.duration - lastSeek.time);
57
+ }
58
+ function currentMaxDuration() {
59
+ if (!previewVideo.current || !lastSeek)
60
+ return 30;
61
+ return Math.min(30, previewVideo.current.duration - lastSeek.time);
62
+ }
63
+ function onSeeked() {
64
+ if (changingDuration) {
65
+ changingDuration = false;
66
+ return;
67
+ }
68
+ const v = previewVideo.current;
69
+ if (v?.currentTime && v.duration)
70
+ setLastSeek({ time: v?.currentTime, end: v?.duration });
71
+ else
72
+ setLastSeek(undefined);
73
+ }
74
+ }
75
+ exports.default = InlineView;
76
+ //# sourceMappingURL=summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/processor.actionReplay/summary.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAAoD;AAEpD,oDAAyB;AAEzB,IAAI,gBAAgB,GAAG,KAAK,CAAC;AAE7B,SAAS,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAA6G;IAC3J,MAAM,GAAG,GAAG,KAAK,CAAC,gBAAgB,CAAC;IACnC,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,MAAM,YAAY,GAAG,IAAA,cAAM,EAAmB,IAAI,CAAC,CAAA;IAEnD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAA4C,SAAS,CAAC,CAAC;IAC/F,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IAE7D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAA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gB,GAAG,KAAK,CAAC;YACzB,OAAO;QACT,CAAC;QACD,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,CAAC,QAAQ;YAC9B,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;;YAEvD,WAAW,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,kBAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AudioLevelCommand, AudioLevelEvent, AudioLevelSettings, AudioLevelState } from "./runtime";
2
+ import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
3
+ export default function ({ defineComponent, Audio, validation: { Z }, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<AudioLevelSettings, AudioLevelState, AudioLevelCommand, AudioLevelEvent>;