@norskvideo/norsk-studio-built-ins 1.11.6 → 1.12.0-2025-01-27-b21c8c91

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 (238) hide show
  1. package/README.md +16 -0
  2. package/client/info.js +1278 -776
  3. package/client/output.whep/styles.css +9 -0
  4. package/client/style.css +501 -858
  5. package/lib/info.js +4 -8
  6. package/lib/info.js.map +1 -1
  7. package/lib/input.rtmp/info.js +2 -1
  8. package/lib/input.rtmp/info.js.map +1 -1
  9. package/lib/input.rtmp/openApi.d.ts +133 -0
  10. package/lib/input.rtmp/openApi.js +3 -0
  11. package/lib/input.rtmp/openApi.js.map +1 -0
  12. package/lib/input.rtmp/runtime.d.ts +24 -5
  13. package/lib/input.rtmp/runtime.js +166 -60
  14. package/lib/input.rtmp/runtime.js.map +1 -1
  15. package/lib/input.rtmp/summary-view.d.ts +3 -5
  16. package/lib/input.rtmp/summary-view.js +26 -6
  17. package/lib/input.rtmp/summary-view.js.map +1 -1
  18. package/lib/input.rtmp/types.yaml +99 -0
  19. package/lib/input.silence/info.js +3 -2
  20. package/lib/input.silence/info.js.map +1 -1
  21. package/lib/input.srt-caller/info.js +6 -5
  22. package/lib/input.srt-caller/info.js.map +1 -1
  23. package/lib/input.srt-caller/runtime.d.ts +1 -1
  24. package/lib/input.srt-listener/info.js +7 -5
  25. package/lib/input.srt-listener/info.js.map +1 -1
  26. package/lib/input.srt-listener/openApi.d.ts +133 -0
  27. package/lib/input.srt-listener/openApi.js +3 -0
  28. package/lib/input.srt-listener/openApi.js.map +1 -0
  29. package/lib/input.srt-listener/runtime.d.ts +26 -6
  30. package/lib/input.srt-listener/runtime.js +168 -57
  31. package/lib/input.srt-listener/runtime.js.map +1 -1
  32. package/lib/input.srt-listener/summary-view.d.ts +3 -5
  33. package/lib/input.srt-listener/summary-view.js +28 -4
  34. package/lib/input.srt-listener/summary-view.js.map +1 -1
  35. package/lib/input.srt-listener/types.yaml +99 -0
  36. package/lib/input.udp-ts/info.d.ts +1 -1
  37. package/lib/input.udp-ts/info.js +5 -4
  38. package/lib/input.udp-ts/info.js.map +1 -1
  39. package/lib/input.udp-ts/runtime.d.ts +1 -1
  40. package/lib/input.videoTestCard/info.d.ts +1 -1
  41. package/lib/input.videoTestCard/info.js +14 -4
  42. package/lib/input.videoTestCard/info.js.map +1 -1
  43. package/lib/output.autoCmaf/info.d.ts +2 -2
  44. package/lib/output.autoCmaf/info.js +65 -7
  45. package/lib/output.autoCmaf/info.js.map +1 -1
  46. package/lib/output.autoCmaf/runtime.d.ts +29 -9
  47. package/lib/output.autoCmaf/runtime.js +198 -60
  48. package/lib/output.autoCmaf/runtime.js.map +1 -1
  49. package/lib/output.autoCmaf/summary.js +26 -1
  50. package/lib/output.autoCmaf/summary.js.map +1 -1
  51. package/lib/output.autoCmaf/types.d.ts +101 -0
  52. package/lib/output.autoCmaf/types.js +3 -0
  53. package/lib/output.autoCmaf/types.js.map +1 -0
  54. package/lib/output.autoCmaf/types.yaml +28 -0
  55. package/lib/output.preview/info.js +4 -2
  56. package/lib/output.preview/info.js.map +1 -1
  57. package/lib/output.preview/inline-view.d.ts +2 -4
  58. package/lib/output.preview/inline-view.js +8 -4
  59. package/lib/output.preview/inline-view.js.map +1 -1
  60. package/lib/output.preview/runtime.d.ts +4 -3
  61. package/lib/output.preview/runtime.js +29 -18
  62. package/lib/output.preview/runtime.js.map +1 -1
  63. package/lib/output.rtmp/info.js +1 -0
  64. package/lib/output.rtmp/info.js.map +1 -1
  65. package/lib/output.rtmp/inline-view.js +2 -2
  66. package/lib/output.rtmp/runtime.d.ts +2 -2
  67. package/lib/output.rtmp/runtime.js.map +1 -1
  68. package/lib/output.srt/info.d.ts +2 -2
  69. package/lib/output.srt/info.js +26 -5
  70. package/lib/output.srt/info.js.map +1 -1
  71. package/lib/output.srt/runtime.d.ts +30 -5
  72. package/lib/output.srt/runtime.js +139 -5
  73. package/lib/output.srt/runtime.js.map +1 -1
  74. package/lib/output.srt/types.d.ts +101 -0
  75. package/lib/output.srt/types.js +3 -0
  76. package/lib/output.srt/types.js.map +1 -0
  77. package/lib/output.srt/types.yaml +31 -0
  78. package/lib/output.statistics/info.js +1 -0
  79. package/lib/output.statistics/info.js.map +1 -1
  80. package/lib/output.statistics/inline-view.js +3 -2
  81. package/lib/output.statistics/inline-view.js.map +1 -1
  82. package/lib/output.statistics/runtime.d.ts +1 -1
  83. package/lib/output.statistics/runtime.js.map +1 -1
  84. package/lib/output.udpTs/info.d.ts +1 -1
  85. package/lib/output.udpTs/info.js +4 -3
  86. package/lib/output.udpTs/info.js.map +1 -1
  87. package/lib/output.udpTs/runtime.d.ts +1 -1
  88. package/lib/output.whep/info.d.ts +2 -2
  89. package/lib/output.whep/info.js +48 -0
  90. package/lib/output.whep/info.js.map +1 -1
  91. package/lib/output.whep/inline-view.d.ts +4 -0
  92. package/lib/output.whep/inline-view.js +24 -0
  93. package/lib/output.whep/inline-view.js.map +1 -0
  94. package/lib/output.whep/runtime.d.ts +26 -5
  95. package/lib/output.whep/runtime.js +64 -13
  96. package/lib/output.whep/runtime.js.map +1 -1
  97. package/lib/output.whep/types.d.ts +101 -0
  98. package/lib/output.whep/types.js +3 -0
  99. package/lib/output.whep/types.js.map +1 -0
  100. package/lib/output.whep/types.yaml +30 -0
  101. package/lib/processor.browserOverlay/info.d.ts +2 -2
  102. package/lib/processor.browserOverlay/info.js +56 -2
  103. package/lib/processor.browserOverlay/info.js.map +1 -1
  104. package/lib/processor.browserOverlay/inline-view.d.ts +6 -0
  105. package/lib/processor.browserOverlay/inline-view.js +8 -0
  106. package/lib/processor.browserOverlay/inline-view.js.map +1 -0
  107. package/lib/processor.browserOverlay/openApi.d.ts +174 -0
  108. package/lib/processor.browserOverlay/openApi.js +3 -0
  109. package/lib/processor.browserOverlay/openApi.js.map +1 -0
  110. package/lib/processor.browserOverlay/runtime.d.ts +40 -6
  111. package/lib/processor.browserOverlay/runtime.js +151 -23
  112. package/lib/processor.browserOverlay/runtime.js.map +1 -1
  113. package/lib/processor.browserOverlay/summary-view.d.ts +4 -0
  114. package/lib/processor.browserOverlay/summary-view.js +27 -0
  115. package/lib/processor.browserOverlay/summary-view.js.map +1 -0
  116. package/lib/processor.browserOverlay/types.yaml +65 -0
  117. package/lib/processor.cascadingSwitch/info.js +4 -3
  118. package/lib/processor.cascadingSwitch/info.js.map +1 -1
  119. package/lib/processor.cascadingSwitch/inline-view.js +3 -3
  120. package/lib/processor.cascadingSwitch/runtime.d.ts +1 -1
  121. package/lib/processor.cascadingSwitch/runtime.js +2 -2
  122. package/lib/processor.cascadingSwitch/runtime.js.map +1 -1
  123. package/lib/processor.fixedLadder/codec-editor.js +1 -1
  124. package/lib/processor.fixedLadder/codec-editor.js.map +1 -1
  125. package/lib/processor.fixedLadder/codec-view.js +1 -1
  126. package/lib/processor.fixedLadder/codec-view.js.map +1 -1
  127. package/lib/processor.fixedLadder/info.js +4 -2
  128. package/lib/processor.fixedLadder/info.js.map +1 -1
  129. package/lib/processor.fixedLadder/rung-view.js +1 -1
  130. package/lib/processor.fixedLadder/rung-view.js.map +1 -1
  131. package/lib/processor.onscreenGraphic/image-selection.d.ts +9 -0
  132. package/lib/{processor.dynamicBug/bug-selection.js → processor.onscreenGraphic/image-selection.js} +10 -10
  133. package/lib/processor.onscreenGraphic/image-selection.js.map +1 -0
  134. package/lib/processor.onscreenGraphic/info.d.ts +3 -0
  135. package/lib/{processor.dynamicBug → processor.onscreenGraphic}/info.js +23 -16
  136. package/lib/processor.onscreenGraphic/info.js.map +1 -0
  137. package/lib/processor.onscreenGraphic/runtime.d.ts +91 -0
  138. package/lib/processor.onscreenGraphic/runtime.js +503 -0
  139. package/lib/processor.onscreenGraphic/runtime.js.map +1 -0
  140. package/lib/processor.onscreenGraphic/summary-view.d.ts +4 -0
  141. package/lib/processor.onscreenGraphic/summary-view.js +343 -0
  142. package/lib/processor.onscreenGraphic/summary-view.js.map +1 -0
  143. package/lib/processor.onscreenGraphic/types.d.ts +271 -0
  144. package/lib/processor.onscreenGraphic/types.js +3 -0
  145. package/lib/processor.onscreenGraphic/types.js.map +1 -0
  146. package/lib/processor.onscreenGraphic/types.yaml +211 -0
  147. package/lib/processor.streamKeyOverride/info.d.ts +3 -0
  148. package/lib/processor.streamKeyOverride/info.js +150 -0
  149. package/lib/processor.streamKeyOverride/info.js.map +1 -0
  150. package/lib/processor.streamKeyOverride/runtime.d.ts +54 -0
  151. package/lib/processor.streamKeyOverride/runtime.js +226 -0
  152. package/lib/processor.streamKeyOverride/runtime.js.map +1 -0
  153. package/lib/shared/drm/axinom.d.ts +2 -0
  154. package/lib/shared/drm/axinom.js +120 -0
  155. package/lib/shared/drm/axinom.js.map +1 -0
  156. package/lib/shared/drm/cpix.d.ts +24 -0
  157. package/lib/shared/drm/cpix.js +97 -0
  158. package/lib/shared/drm/cpix.js.map +1 -0
  159. package/lib/shared/drm/ezdrm.d.ts +2 -0
  160. package/lib/shared/drm/ezdrm.js +26 -0
  161. package/lib/shared/drm/ezdrm.js.map +1 -0
  162. package/lib/shared/srt-socket-options.js +6 -6
  163. package/lib/shared/srt-socket-options.js.map +1 -1
  164. package/lib/test/auto-cmaf.js +25 -17
  165. package/lib/test/auto-cmaf.js.map +1 -1
  166. package/lib/test/browser-overlay.js +1 -0
  167. package/lib/test/browser-overlay.js.map +1 -1
  168. package/lib/test/{dynamic-bug.js → onscreen-graphic.js} +139 -106
  169. package/lib/test/onscreen-graphic.js.map +1 -0
  170. package/lib/test/preview.js +3 -3
  171. package/lib/test/preview.js.map +1 -1
  172. package/lib/test/rtmp-input.js +6 -3
  173. package/lib/test/rtmp-input.js.map +1 -1
  174. package/lib/test/srt-input-caller.js +5 -5
  175. package/lib/test/srt-input-caller.js.map +1 -1
  176. package/lib/test/srt-input-listener.js +99 -18
  177. package/lib/test/srt-input-listener.js.map +1 -1
  178. package/lib/test/srt-output.js +2 -2
  179. package/lib/test/srt-output.js.map +1 -1
  180. package/lib/test/udp-output.js +2 -2
  181. package/lib/test/udp-output.js.map +1 -1
  182. package/lib/test/udp-ts-input.js +2 -2
  183. package/lib/test/udp-ts-input.js.map +1 -1
  184. package/lib/test/whep-output.js +8 -2
  185. package/lib/test/whep-output.js.map +1 -1
  186. package/lib/{util.latency → util.stats.latency}/info.js +2 -1
  187. package/lib/util.stats.latency/info.js.map +1 -0
  188. package/lib/util.stats.latency/inline-view.js.map +1 -0
  189. package/lib/{util.latency → util.stats.latency}/runtime.d.ts +1 -1
  190. package/lib/{util.latency → util.stats.latency}/runtime.js +2 -2
  191. package/lib/util.stats.latency/runtime.js.map +1 -0
  192. package/lib/util.stats.latency/source-node-selection.js.map +1 -0
  193. package/package.json +12 -5
  194. package/lib/processor.dynamicBug/bug-selection.d.ts +0 -9
  195. package/lib/processor.dynamicBug/bug-selection.js.map +0 -1
  196. package/lib/processor.dynamicBug/info.d.ts +0 -3
  197. package/lib/processor.dynamicBug/info.js.map +0 -1
  198. package/lib/processor.dynamicBug/runtime.d.ts +0 -64
  199. package/lib/processor.dynamicBug/runtime.js +0 -297
  200. package/lib/processor.dynamicBug/runtime.js.map +0 -1
  201. package/lib/processor.dynamicBug/summary-view.d.ts +0 -4
  202. package/lib/processor.dynamicBug/summary-view.js +0 -60
  203. package/lib/processor.dynamicBug/summary-view.js.map +0 -1
  204. package/lib/processor.whisper-transcribe/info.d.ts +0 -3
  205. package/lib/processor.whisper-transcribe/info.js +0 -43
  206. package/lib/processor.whisper-transcribe/info.js.map +0 -1
  207. package/lib/processor.whisper-transcribe/runtime.d.ts +0 -29
  208. package/lib/processor.whisper-transcribe/runtime.js +0 -83
  209. package/lib/processor.whisper-transcribe/runtime.js.map +0 -1
  210. package/lib/test/dynamic-bug.js.map +0 -1
  211. package/lib/util.latency/info.js.map +0 -1
  212. package/lib/util.latency/inline-view.js.map +0 -1
  213. package/lib/util.latency/runtime.js.map +0 -1
  214. package/lib/util.latency/source-node-selection.js.map +0 -1
  215. package/lib/util.ma35d/info.d.ts +0 -3
  216. package/lib/util.ma35d/info.js +0 -78
  217. package/lib/util.ma35d/info.js.map +0 -1
  218. package/lib/util.ma35d/inline-view.d.ts +0 -6
  219. package/lib/util.ma35d/inline-view.js +0 -76
  220. package/lib/util.ma35d/inline-view.js.map +0 -1
  221. package/lib/util.ma35d/runtime.d.ts +0 -21
  222. package/lib/util.ma35d/runtime.js +0 -49
  223. package/lib/util.ma35d/runtime.js.map +0 -1
  224. package/lib/util.timestamps/info.d.ts +0 -5
  225. package/lib/util.timestamps/info.js +0 -86
  226. package/lib/util.timestamps/info.js.map +0 -1
  227. package/lib/util.timestamps/inline-view.d.ts +0 -6
  228. package/lib/util.timestamps/inline-view.js +0 -94
  229. package/lib/util.timestamps/inline-view.js.map +0 -1
  230. package/lib/util.timestamps/runtime.d.ts +0 -29
  231. package/lib/util.timestamps/runtime.js +0 -40
  232. package/lib/util.timestamps/runtime.js.map +0 -1
  233. /package/lib/test/{dynamic-bug.d.ts → onscreen-graphic.d.ts} +0 -0
  234. /package/lib/{util.latency → util.stats.latency}/info.d.ts +0 -0
  235. /package/lib/{util.latency → util.stats.latency}/inline-view.d.ts +0 -0
  236. /package/lib/{util.latency → util.stats.latency}/inline-view.js +0 -0
  237. /package/lib/{util.latency → util.stats.latency}/source-node-selection.d.ts +0 -0
  238. /package/lib/{util.latency → util.stats.latency}/source-node-selection.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/output.whep/info.ts"],"names":[],"mappings":";;AAKA,4BA+BC;AAjCD,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,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,EAAE,CAAC,IAAI,CAAC;gBACvB,QAAQ,MAAM,EAAE,CAAC;oBACf,KAAK,eAAe;wBAClB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC;wBACnB,MAAM;oBACR;wBACE,iBAAiB,CAAC,MAAM,CAAC,CAAA;gBAC7B,CAAC;gBACD,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;YACtB,CAAC;YACD,MAAM,EAAE,UAAU;SACnB;QACD,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;AAED,SAAS,iBAAiB,CAAC,CAAQ;IACjC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { WhepOutputState, WhepOutputSettings } from "./runtime";
2
+ import type { ViewProps } from "@norskvideo/norsk-studio/lib/extension/client-types";
3
+ declare function InlineView({ state, config, raise }: ViewProps<WhepOutputSettings, WhepOutputState>): import("react/jsx-runtime").JSX.Element;
4
+ export default InlineView;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
5
+ const webrtc_client_1 = require("@norskvideo/webrtc-client");
6
+ function InlineView({ state, config, raise }) {
7
+ const url = state.url;
8
+ const id = config.id;
9
+ (0, react_1.useEffect)(() => {
10
+ if (!url)
11
+ return;
12
+ const client = new webrtc_client_1.WhepClient({
13
+ url,
14
+ container: document.getElementById(`whep-${id}`) ?? undefined,
15
+ });
16
+ void client.start();
17
+ }, [state.url]);
18
+ raise && (0, react_1.useEffect)(raise, []);
19
+ if (!url)
20
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "..." });
21
+ return ((0, jsx_runtime_1.jsx)("div", { className: "whep-container", children: (0, jsx_runtime_1.jsx)("div", { className: "whep-video", id: `whep-${id}` }) }));
22
+ }
23
+ exports.default = InlineView;
24
+ //# sourceMappingURL=inline-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-view.js","sourceRoot":"","sources":["../../src/output.whep/inline-view.tsx"],"names":[],"mappings":";;;AAAA,iCAAkC;AAElC,6DAAuD;AAGvD,SAAS,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAkD;IAC1F,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;IACtB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IAErB,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG;YAAE,OAAO;QACjB,MAAM,MAAM,GAAG,IAAI,0BAAU,CAAC;YAC5B,GAAG;YACH,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,SAAS;SAC9D,CAAC,CAAC;QACH,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAEhB,KAAK,IAAI,IAAA,iBAAS,EAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAE9B,IAAI,CAAC,GAAG;QAAE,OAAO,mEAAQ,CAAC;IAE1B,OAAO,CACL,gCAAK,SAAS,EAAC,gBAAgB,YAC7B,gCAAK,SAAS,EAAC,YAAY,EAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,GAAI,GAC5C,CACP,CAAC;AACJ,CAAC;AAED,kBAAe,UAAU,CAAC"}
@@ -1,7 +1,8 @@
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';
1
+ import { Norsk, WhepOutputSettings as SdkSettings, WhepOutputNode } from '@norskvideo/norsk-sdk';
2
+ import { OnCreated, RuntimeUpdates, ServerComponentDefinition, StudioNodeSubscriptionSource, StudioRuntime, StudioShared } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
3
+ import { CustomSinkNode, SimpleSinkWrapper, SubscriptionOpts } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
4
4
  import { IceServer } from '@norskvideo/norsk-studio/lib/shared/config';
5
+ import { ContextPromiseControl } from '@norskvideo/norsk-studio/lib/runtime/util';
5
6
  export type WhepOutputSettings = {
6
7
  id: string;
7
8
  displayName: string;
@@ -10,6 +11,26 @@ export type WhepOutputSettings = {
10
11
  iceServers: IceServer[];
11
12
  };
12
13
  };
13
- export default class WhepOutputDefinition implements ServerComponentDefinition<WhepOutputSettings, SimpleSinkWrapper> {
14
- create(norsk: Norsk, cfg: WhepOutputSettings, cb: OnCreated<SimpleSinkWrapper>, { report }: StudioRuntime): Promise<void>;
14
+ export type WhepOutputState = {
15
+ url?: string;
16
+ };
17
+ export type WhepOutputEvent = {
18
+ type: 'url-published';
19
+ url: string;
20
+ };
21
+ export type WhepOutputCommand = object;
22
+ export declare class WhepOutput extends CustomSinkNode {
23
+ initialised: Promise<void>;
24
+ norsk: Norsk;
25
+ updates: RuntimeUpdates<WhepOutputState, WhepOutputCommand, WhepOutputEvent>;
26
+ shared: StudioShared;
27
+ cfg: WhepOutputSettings;
28
+ whep?: WhepOutputNode;
29
+ context: ContextPromiseControl;
30
+ constructor(norsk: Norsk, { updates, shared }: StudioRuntime<WhepOutputState, WhepOutputCommand, WhepOutputEvent>, cfg: WhepOutputSettings);
31
+ subscribe(sources: StudioNodeSubscriptionSource[], _opts?: SubscriptionOpts): void;
32
+ subscribeImpl(sources: StudioNodeSubscriptionSource[]): Promise<void>;
33
+ }
34
+ export default class WhepOutputDefinition implements ServerComponentDefinition<WhepOutputSettings, SimpleSinkWrapper, WhepOutputState, WhepOutputCommand, WhepOutputEvent> {
35
+ create(norsk: Norsk, cfg: WhepOutputSettings, cb: OnCreated<SimpleSinkWrapper>, runtime: StudioRuntime<WhepOutputState, WhepOutputCommand, WhepOutputEvent>): Promise<void>;
15
36
  }
@@ -1,21 +1,72 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WhepOutput = void 0;
3
4
  const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
4
5
  const webrtcSettings_1 = require("../shared/webrtcSettings");
6
+ const util_1 = require("@norskvideo/norsk-studio/lib/runtime/util");
7
+ class WhepOutput extends base_nodes_1.CustomSinkNode {
8
+ initialised;
9
+ norsk;
10
+ updates;
11
+ shared;
12
+ cfg;
13
+ whep;
14
+ context = new util_1.ContextPromiseControl(this.subscribeImpl.bind(this));
15
+ constructor(norsk, { updates, shared }, cfg) {
16
+ super(cfg.id);
17
+ this.cfg = cfg;
18
+ this.norsk = norsk;
19
+ this.updates = updates;
20
+ this.shared = shared;
21
+ this.initialised = Promise.resolve();
22
+ }
23
+ subscribe(sources, _opts) {
24
+ this.context.setSources(sources);
25
+ }
26
+ async subscribeImpl(sources) {
27
+ const videoSource = sources.filter((s) => s.streams.select.includes("video")).at(0)?.selectVideo();
28
+ const audioSource = sources.filter((s) => s.streams.select.includes("audio")).at(0)?.selectAudio();
29
+ const subscriptions = [];
30
+ if (videoSource && videoSource.length > 0) {
31
+ subscriptions.push(videoSource[0]);
32
+ }
33
+ if (audioSource && audioSource.length > 0) {
34
+ subscriptions.push(audioSource[0]);
35
+ }
36
+ if (subscriptions.length > 0) {
37
+ if (!this.whep) {
38
+ const whepCfg = {
39
+ id: `${this.cfg.id}-whep`,
40
+ bufferDelayMs: this.cfg.bufferDelayMs,
41
+ onPublishStart: () => {
42
+ const url = this.whep?.endpointUrl;
43
+ if (url) {
44
+ this.updates.raiseEvent({ type: 'url-published', url });
45
+ this.updates.update({ url });
46
+ }
47
+ },
48
+ ...(0, webrtcSettings_1.webRtcSettings)(this.cfg.__global.iceServers)
49
+ };
50
+ this.whep = await this.norsk.output.whep(whepCfg);
51
+ }
52
+ this.whep?.subscribe(subscriptions, (ctx) => {
53
+ return ctx.streams.length === subscriptions.length;
54
+ });
55
+ }
56
+ else {
57
+ await this.whep?.close();
58
+ this.whep = undefined;
59
+ this.updates.update({});
60
+ }
61
+ }
62
+ }
63
+ exports.WhepOutput = WhepOutput;
5
64
  class WhepOutputDefinition {
6
- async create(norsk, cfg, cb, { report }) {
7
- const wrapper = new base_nodes_1.SimpleSinkWrapper(cfg.id, async () => {
8
- const mappedCfg = {
9
- id: cfg.id,
10
- bufferDelayMs: cfg.bufferDelayMs,
11
- ...(0, webrtcSettings_1.webRtcSettings)(cfg.__global.iceServers),
12
- };
13
- const node = await norsk.output.whep(mappedCfg);
14
- report.registerOutput(cfg.id, node.playerUrl);
15
- return node;
16
- });
17
- await wrapper.initialised;
18
- void cb(wrapper);
65
+ async create(norsk, cfg, cb, runtime) {
66
+ const node = new WhepOutput(norsk, runtime, cfg);
67
+ runtime.report.registerOutput(cfg.id, node.whep?.endpointUrl);
68
+ await node.initialised;
69
+ cb(node);
19
70
  }
20
71
  }
21
72
  exports.default = WhepOutputDefinition;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/output.whep/runtime.ts"],"names":[],"mappings":";;AAGA,kFAAsF;AAEtF,6DAAwD;AAWxD,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,MAA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paths {
2
+ "/enable": {
3
+ parameters: {
4
+ query?: never;
5
+ header?: never;
6
+ path?: never;
7
+ cookie?: never;
8
+ };
9
+ get?: never;
10
+ put?: never;
11
+ post: {
12
+ parameters: {
13
+ query?: never;
14
+ header?: never;
15
+ path?: never;
16
+ cookie?: never;
17
+ };
18
+ requestBody?: never;
19
+ responses: {
20
+ 204: {
21
+ headers: {
22
+ [name: string]: unknown;
23
+ };
24
+ content?: never;
25
+ };
26
+ 400: {
27
+ headers: {
28
+ [name: string]: unknown;
29
+ };
30
+ content?: never;
31
+ };
32
+ 500: {
33
+ headers: {
34
+ [name: string]: unknown;
35
+ };
36
+ content?: never;
37
+ };
38
+ };
39
+ };
40
+ delete?: never;
41
+ options?: never;
42
+ head?: never;
43
+ patch?: never;
44
+ trace?: never;
45
+ };
46
+ "/disable": {
47
+ parameters: {
48
+ query?: never;
49
+ header?: never;
50
+ path?: never;
51
+ cookie?: never;
52
+ };
53
+ get?: never;
54
+ put?: never;
55
+ post: {
56
+ parameters: {
57
+ query?: never;
58
+ header?: never;
59
+ path?: never;
60
+ cookie?: never;
61
+ };
62
+ requestBody?: never;
63
+ responses: {
64
+ 204: {
65
+ headers: {
66
+ [name: string]: unknown;
67
+ };
68
+ content?: never;
69
+ };
70
+ 400: {
71
+ headers: {
72
+ [name: string]: unknown;
73
+ };
74
+ content?: never;
75
+ };
76
+ 500: {
77
+ headers: {
78
+ [name: string]: unknown;
79
+ };
80
+ content?: never;
81
+ };
82
+ };
83
+ };
84
+ delete?: never;
85
+ options?: never;
86
+ head?: never;
87
+ patch?: never;
88
+ trace?: never;
89
+ };
90
+ }
91
+ export type webhooks = Record<string, never>;
92
+ export interface components {
93
+ schemas: never;
94
+ responses: never;
95
+ parameters: never;
96
+ requestBodies: never;
97
+ headers: never;
98
+ pathItems: never;
99
+ }
100
+ export type $defs = Record<string, never>;
101
+ export type operations = Record<string, never>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/output.whep/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Whep Output Component
4
+ version: 1.0.0
5
+
6
+ paths:
7
+ /enable:
8
+ post:
9
+ summary: Enable WHEP output
10
+ description: Enables output if currently disabled
11
+ x-route-type: instance
12
+ responses:
13
+ 204:
14
+ description: Output successfully enabled
15
+ 400:
16
+ description: Output is already enabled
17
+ 500:
18
+ description: Server error while enabling output
19
+ /disable:
20
+ post:
21
+ summary: Disable WHEP output
22
+ description: Disables output if currently enabled
23
+ x-route-type: instance
24
+ responses:
25
+ 204:
26
+ description: Output successfully disabled
27
+ 400:
28
+ description: Output is already disabled
29
+ 500:
30
+ description: Server error while disabling output
@@ -1,3 +1,3 @@
1
1
  import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
2
- import type { BrowserOverlayConfig } from "./runtime";
3
- export default function ({ defineComponent, Video, validation: { Z }, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<BrowserOverlayConfig, object, object, object>;
2
+ import type { BrowserOverlayCommand, BrowserOverlayConfig, BrowserOverlayEvent, BrowserOverlayState } from "./runtime";
3
+ export default function ({ defineComponent, Video, validation: { Z }, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<BrowserOverlayConfig, BrowserOverlayState, BrowserOverlayCommand, BrowserOverlayEvent>;
@@ -1,12 +1,42 @@
1
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
+ };
2
28
  Object.defineProperty(exports, "__esModule", { value: true });
3
29
  exports.default = default_1;
4
30
  const config_1 = require("@norskvideo/norsk-studio/lib/shared/config");
31
+ const react_1 = __importDefault(require("react"));
32
+ const SummaryView = react_1.default.lazy(async () => Promise.resolve().then(() => __importStar(require('./summary-view'))));
33
+ const InlineView = react_1.default.lazy(async () => Promise.resolve().then(() => __importStar(require('./inline-view'))));
5
34
  function default_1({ defineComponent, Video, validation: { Z }, }) {
6
35
  return defineComponent({
7
- identifier: 'processor.transform.browserOverlay',
36
+ identifier: 'processor.browserOverlay',
8
37
  category: 'processor',
9
38
  name: "Browser Overlay",
39
+ description: 'Capture a live URL and overlay onto a video',
10
40
  subscription: {
11
41
  accepts: {
12
42
  type: 'single-stream',
@@ -22,9 +52,30 @@ function default_1({ defineComponent, Video, validation: { Z }, }) {
22
52
  },
23
53
  display: (desc) => {
24
54
  return {
25
- url: desc.config?.url
55
+ url: desc.config.url
26
56
  };
27
57
  },
58
+ runtime: {
59
+ summary: SummaryView,
60
+ inline: InlineView,
61
+ initialState: () => ({
62
+ currentUrl: "",
63
+ enabled: true
64
+ }),
65
+ handleEvent: (ev, state) => {
66
+ const evType = ev.type;
67
+ switch (evType) {
68
+ case "url-changed":
69
+ return { ...state, currentUrl: ev.url };
70
+ case "enabled":
71
+ return { ...state, enabled: true };
72
+ case "disabled":
73
+ return { ...state, enabled: false };
74
+ default:
75
+ assertUnreachable(evType);
76
+ }
77
+ }
78
+ },
28
79
  configForm: {
29
80
  global: {
30
81
  hardware: (0, config_1.HardwareSelection)()
@@ -35,4 +86,7 @@ function default_1({ defineComponent, Video, validation: { Z }, }) {
35
86
  }
36
87
  });
37
88
  }
89
+ function assertUnreachable(_) {
90
+ throw new Error("Didn't expect to get here");
91
+ }
38
92
  //# sourceMappingURL=info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/processor.browserOverlay/info.ts"],"names":[],"mappings":";;AAKA,4BAqCC;AAxCD,uEAA+E;AAG/E,mBAAwB,EACtB,eAAe,EACf,KAAK,EACL,UAAU,EAAE,EAAE,CAAC,EAAE,GACJ;IACb,OAAO,eAAe,CAAuB;QAC3C,UAAU,EAAE,oCAAoC;QAChD,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,iBAAiB;QACvB,YAAY,EAAE;YAEZ,OAAO,EAAE;gBACP,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,KAAK;aACb;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,KAAK;aACb;SACF;QACD,eAAe,EAAE,UAAS,GAAG;YAC3B,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YAChB,OAAO;gBACL,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG;aACtB,CAAA;QACH,CAAC;QACD,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,QAAQ,EAAE,IAAA,0BAAiB,GAAE;aAC9B;YACD,IAAI,EAAE;gBACJ,GAAG,EAAE,EAAE,IAAI,EAAE,mCAAmC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UA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ACd,CAAC;YACF,WAAW,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC;gBACvB,QAAQ,MAAM,EAAE,CAAC;oBACf,KAAK,aAAa;wBAChB,OAAO,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC;oBAC1C,KAAK,SAAS;wBACZ,OAAO,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oBACrC,KAAK,UAAU;wBACb,OAAO,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC;oBACrC;wBACE,iBAAiB,CAAC,MAAM,CAAC,CAAA;gBAC7B,CAAC;YACH,CAAC;SACF;QACD,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,QAAQ,EAAE,IAAA,0BAAiB,GAAE;aAC9B;YACD,IAAI,EAAE;gBACJ,GAAG,EAAE,EAAE,IAAI,EAAE,mCAAmC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE;aAC3H;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAQ;IACjC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { BrowserOverlayState, BrowserOverlayConfig } from "./runtime";
2
+ declare function InlineView({ state, config }: {
3
+ state: BrowserOverlayState;
4
+ config: BrowserOverlayConfig;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export default InlineView;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ function InlineView({ state, config }) {
5
+ return (0, jsx_runtime_1.jsx)("div", { id: `browser-overlay-${config.id}`, children: (0, jsx_runtime_1.jsxs)("div", { className: "w-64 grid grid-cols-[min-content,1fr] gap-2", children: [(0, jsx_runtime_1.jsx)("div", { children: "URL:" }), (0, jsx_runtime_1.jsx)("div", { className: "truncate", children: state.currentUrl }), (0, jsx_runtime_1.jsx)("div", { children: "Enabled:" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("label", { className: "inline-flex items-center cursor-pointer", children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: state.enabled, disabled: true, className: "sr-only peer" }), (0, jsx_runtime_1.jsx)("div", { className: "relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" })] }) })] }) });
6
+ }
7
+ exports.default = InlineView;
8
+ //# sourceMappingURL=inline-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-view.js","sourceRoot":"","sources":["../../src/processor.browserOverlay/inline-view.tsx"],"names":[],"mappings":";;;AAEA,SAAS,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAgE;IAClG,OAAO,gCAAK,EAAE,EAAE,mBAAmB,MAAM,CAAC,EAAE,EAAE,YAC7C,iCAAK,SAAS,EAAC,6CAA6C,aAC3D,mDAAe,EACf,gCAAK,SAAS,EAAC,UAAU,YAAE,KAAK,CAAC,UAAU,GAAO,EAElD,uDAAmB,EACnB,0CACC,mCAAO,SAAS,EAAC,yCAAyC,aACzD,kCAAO,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,QAAC,SAAS,EAAC,cAAc,GAAG,EACnF,gCAAK,SAAS,EAAC,gfAAgf,GAAO,IAC/f,GACH,IACD,GACD,CAAA;AACP,CAAC;AAED,kBAAe,UAAU,CAAC"}
@@ -0,0 +1,174 @@
1
+ export interface paths {
2
+ "/url": {
3
+ parameters: {
4
+ query?: never;
5
+ header?: never;
6
+ path?: never;
7
+ cookie?: never;
8
+ };
9
+ get: {
10
+ parameters: {
11
+ query?: never;
12
+ header?: never;
13
+ path?: never;
14
+ cookie?: never;
15
+ };
16
+ requestBody?: never;
17
+ responses: {
18
+ 200: {
19
+ headers: {
20
+ [name: string]: unknown;
21
+ };
22
+ content: {
23
+ "text/plain": string;
24
+ };
25
+ };
26
+ };
27
+ };
28
+ put?: never;
29
+ post: {
30
+ parameters: {
31
+ query?: never;
32
+ header?: never;
33
+ path?: never;
34
+ cookie?: never;
35
+ };
36
+ requestBody: {
37
+ content: {
38
+ "application/json": {
39
+ url?: string;
40
+ };
41
+ };
42
+ };
43
+ responses: never;
44
+ };
45
+ delete?: never;
46
+ options?: never;
47
+ head?: never;
48
+ patch?: never;
49
+ trace?: never;
50
+ };
51
+ "/status": {
52
+ parameters: {
53
+ query?: never;
54
+ header?: never;
55
+ path?: never;
56
+ cookie?: never;
57
+ };
58
+ get: {
59
+ parameters: {
60
+ query?: never;
61
+ header?: never;
62
+ path?: never;
63
+ cookie?: never;
64
+ };
65
+ requestBody?: never;
66
+ responses: {
67
+ 200: {
68
+ headers: {
69
+ [name: string]: unknown;
70
+ };
71
+ content: {
72
+ "application/json": {
73
+ enabled?: boolean;
74
+ };
75
+ };
76
+ };
77
+ };
78
+ };
79
+ put?: never;
80
+ post?: never;
81
+ delete?: never;
82
+ options?: never;
83
+ head?: never;
84
+ patch?: never;
85
+ trace?: never;
86
+ };
87
+ "/enable": {
88
+ parameters: {
89
+ query?: never;
90
+ header?: never;
91
+ path?: never;
92
+ cookie?: never;
93
+ };
94
+ get?: never;
95
+ put?: never;
96
+ post: {
97
+ parameters: {
98
+ query?: never;
99
+ header?: never;
100
+ path?: never;
101
+ cookie?: never;
102
+ };
103
+ requestBody?: never;
104
+ responses: {
105
+ 204: {
106
+ headers: {
107
+ [name: string]: unknown;
108
+ };
109
+ content?: never;
110
+ };
111
+ 409: {
112
+ headers: {
113
+ [name: string]: unknown;
114
+ };
115
+ content?: never;
116
+ };
117
+ };
118
+ };
119
+ delete?: never;
120
+ options?: never;
121
+ head?: never;
122
+ patch?: never;
123
+ trace?: never;
124
+ };
125
+ "/disable": {
126
+ parameters: {
127
+ query?: never;
128
+ header?: never;
129
+ path?: never;
130
+ cookie?: never;
131
+ };
132
+ get?: never;
133
+ put?: never;
134
+ post: {
135
+ parameters: {
136
+ query?: never;
137
+ header?: never;
138
+ path?: never;
139
+ cookie?: never;
140
+ };
141
+ requestBody?: never;
142
+ responses: {
143
+ 204: {
144
+ headers: {
145
+ [name: string]: unknown;
146
+ };
147
+ content?: never;
148
+ };
149
+ 409: {
150
+ headers: {
151
+ [name: string]: unknown;
152
+ };
153
+ content?: never;
154
+ };
155
+ };
156
+ };
157
+ delete?: never;
158
+ options?: never;
159
+ head?: never;
160
+ patch?: never;
161
+ trace?: never;
162
+ };
163
+ }
164
+ export type webhooks = Record<string, never>;
165
+ export interface components {
166
+ schemas: never;
167
+ responses: never;
168
+ parameters: never;
169
+ requestBodies: never;
170
+ headers: never;
171
+ pathItems: never;
172
+ }
173
+ export type $defs = Record<string, never>;
174
+ export type operations = Record<string, never>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=openApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openApi.js","sourceRoot":"","sources":["../../src/processor.browserOverlay/openApi.ts"],"names":[],"mappings":""}