@norskvideo/norsk-studio-alpha 1.27.0-2025-09-05-0dc8cc75 → 1.27.0-2025-09-08-fdd138b9

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 (87) hide show
  1. package/client/info.js +1986 -30181
  2. package/client/style.css +0 -92
  3. package/lib/index.js +1 -1
  4. package/lib/index.js.map +1 -1
  5. package/lib/info.js +6 -20
  6. package/lib/info.js.map +1 -1
  7. package/package.json +4 -4
  8. package/lib/input.decklink/info.d.ts +0 -3
  9. package/lib/input.decklink/info.js +0 -51
  10. package/lib/input.decklink/info.js.map +0 -1
  11. package/lib/input.decklink/runtime.d.ts +0 -12
  12. package/lib/input.decklink/runtime.js +0 -22
  13. package/lib/input.decklink/runtime.js.map +0 -1
  14. package/lib/input.decklink/types.d.ts +0 -23
  15. package/lib/input.decklink/types.js +0 -3
  16. package/lib/input.decklink/types.js.map +0 -1
  17. package/lib/input.decklink/types.yaml +0 -32
  18. package/lib/input.mp4file/info.d.ts +0 -3
  19. package/lib/input.mp4file/info.js +0 -34
  20. package/lib/input.mp4file/info.js.map +0 -1
  21. package/lib/input.mp4file/runtime.d.ts +0 -14
  22. package/lib/input.mp4file/runtime.js +0 -33
  23. package/lib/input.mp4file/runtime.js.map +0 -1
  24. package/lib/input.mp4file/types.d.ts +0 -23
  25. package/lib/input.mp4file/types.js +0 -3
  26. package/lib/input.mp4file/types.js.map +0 -1
  27. package/lib/input.mp4file/types.yaml +0 -30
  28. package/lib/input.ndi/info.d.ts +0 -3
  29. package/lib/input.ndi/info.js +0 -52
  30. package/lib/input.ndi/info.js.map +0 -1
  31. package/lib/input.ndi/runtime.d.ts +0 -24
  32. package/lib/input.ndi/runtime.js +0 -60
  33. package/lib/input.ndi/runtime.js.map +0 -1
  34. package/lib/input.ndi/source-selection.d.ts +0 -10
  35. package/lib/input.ndi/source-selection.js +0 -84
  36. package/lib/input.ndi/source-selection.js.map +0 -1
  37. package/lib/input.ndi/types.d.ts +0 -52
  38. package/lib/input.ndi/types.js +0 -3
  39. package/lib/input.ndi/types.js.map +0 -1
  40. package/lib/input.ndi/types.yaml +0 -37
  41. package/lib/output.ndi/info.d.ts +0 -16
  42. package/lib/output.ndi/info.js +0 -63
  43. package/lib/output.ndi/info.js.map +0 -1
  44. package/lib/output.ndi/inline-view.d.ts +0 -6
  45. package/lib/output.ndi/inline-view.js +0 -12
  46. package/lib/output.ndi/inline-view.js.map +0 -1
  47. package/lib/output.ndi/runtime.d.ts +0 -14
  48. package/lib/output.ndi/runtime.js +0 -35
  49. package/lib/output.ndi/runtime.js.map +0 -1
  50. package/lib/output.ndi/types.d.ts +0 -56
  51. package/lib/output.ndi/types.js +0 -3
  52. package/lib/output.ndi/types.js.map +0 -1
  53. package/lib/output.ndi/types.source.yaml +0 -72
  54. package/lib/output.ndi/types.yaml +0 -77
  55. package/lib/processor.gemini-poc/info.d.ts +0 -8
  56. package/lib/processor.gemini-poc/info.js +0 -59
  57. package/lib/processor.gemini-poc/info.js.map +0 -1
  58. package/lib/processor.gemini-poc/runtime.d.ts +0 -38
  59. package/lib/processor.gemini-poc/runtime.js +0 -132
  60. package/lib/processor.gemini-poc/runtime.js.map +0 -1
  61. package/lib/processor.gemini-poc/types.d.ts +0 -23
  62. package/lib/processor.gemini-poc/types.js +0 -3
  63. package/lib/processor.gemini-poc/types.js.map +0 -1
  64. package/lib/processor.gemini-poc/types.yaml +0 -43
  65. package/lib/processor.mixMinus/info.d.ts +0 -7
  66. package/lib/processor.mixMinus/info.js +0 -40
  67. package/lib/processor.mixMinus/info.js.map +0 -1
  68. package/lib/processor.mixMinus/runtime.d.ts +0 -23
  69. package/lib/processor.mixMinus/runtime.js +0 -85
  70. package/lib/processor.mixMinus/runtime.js.map +0 -1
  71. package/lib/processor.mixMinus/types.d.ts +0 -18
  72. package/lib/processor.mixMinus/types.js +0 -3
  73. package/lib/processor.mixMinus/types.js.map +0 -1
  74. package/lib/processor.mixMinus/types.yaml +0 -19
  75. package/lib/processor.monetise/info.d.ts +0 -3
  76. package/lib/processor.monetise/info.js +0 -72
  77. package/lib/processor.monetise/info.js.map +0 -1
  78. package/lib/processor.monetise/runtime.d.ts +0 -62
  79. package/lib/processor.monetise/runtime.js +0 -219
  80. package/lib/processor.monetise/runtime.js.map +0 -1
  81. package/lib/processor.monetise/summary.d.ts +0 -7
  82. package/lib/processor.monetise/summary.js +0 -40
  83. package/lib/processor.monetise/summary.js.map +0 -1
  84. package/lib/processor.monetise/types.d.ts +0 -16
  85. package/lib/processor.monetise/types.js +0 -3
  86. package/lib/processor.monetise/types.js.map +0 -1
  87. package/lib/processor.monetise/types.yaml +0 -9
@@ -1,60 +0,0 @@
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 norsk_sdk_1 = require("@norskvideo/norsk-sdk");
7
- const base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
8
- const api_1 = require("@norskvideo/norsk-studio/lib/server/api");
9
- const path_1 = __importDefault(require("path"));
10
- const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
11
- const schemas_1 = require("../shared/schemas");
12
- class NdiInputDefinition {
13
- async create(norsk, cfg, cb) {
14
- const wrapper = new base_nodes_1.SimpleInputWrapper(cfg.id, async () => {
15
- const input = await norsk.input.ndi({
16
- sourceName: cfg.id,
17
- ndiReceiveName: cfg.ndiReceiveName,
18
- ndiSource: cfg.ndiSource.created ? { url: cfg.ndiSource.url } : { name: cfg.ndiSource.name },
19
- sourceFrameRate: cfg.ignoreSourceFrameRate ? { variable: undefined } : undefined
20
- });
21
- return input;
22
- });
23
- await wrapper.initialised;
24
- cb(wrapper);
25
- }
26
- async staticRoutes() {
27
- let sources = [];
28
- const sourcesDiscovered = (discoveredSources) => {
29
- sources = discoveredSources.map(({ url, name }) => { return { url, name }; });
30
- };
31
- const handleDiscoveryError = async () => {
32
- (0, logging_1.debuglog)("NDI discovery failed");
33
- setTimeout(() => {
34
- startDiscovery().catch(handleDiscoveryError);
35
- }, 500);
36
- };
37
- const startDiscovery = async () => {
38
- const norsk = await norsk_sdk_1.Norsk.connect();
39
- await norsk.system.ndiDiscovery({
40
- showLocalSources: true,
41
- cb: sourcesDiscovered,
42
- onClose: handleDiscoveryError
43
- });
44
- (0, logging_1.debuglog)("NDI Discovery started");
45
- };
46
- await startDiscovery().catch(async () => handleDiscoveryError());
47
- return (0, api_1.defineApi)(path_1.default.join(__dirname, 'types.yaml'), {
48
- '/sources': {
49
- get: (_) => async (_req, res) => {
50
- res.send(JSON.stringify(sources));
51
- }
52
- }
53
- });
54
- }
55
- async schemas() {
56
- return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), { config: 'config' });
57
- }
58
- }
59
- exports.default = NdiInputDefinition;
60
- //# sourceMappingURL=runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/input.ndi/runtime.ts"],"names":[],"mappings":";;;;;AAAA,qDAA0G;AAC1G,kFAAuF;AACvF,iEAAoE;AAGpE,gDAAwB;AAGxB,yEAAuE;AACvE,+CAAoD;AAmBpD,MAAqB,kBAAkB;IACrC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAqB,EAAE,EAAiC;QACjF,MAAM,OAAO,GAAG,IAAI,+BAAkB,CAAC,GAAG,CAAC,EAAE,EAC3C,KAAK,IAAI,EAAE;YACT,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;gBAClC,UAAU,EAAE,GAAG,CAAC,EAAE;gBAClB,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,IAA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EAAE,CAAC,CAAC;QAEjE,OAAO,IAAA,eAAS,EACd,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAClC;YACE,UAAU,EAAE;gBACV,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,IAAa,EAAE,GAAa,EAAE,EAAE;oBACjD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpC,CAAC;aACF;SACF,CAAC,CAAA;IACN,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EACvD,EAAE,MAAM,EAAE,QAAQ,EAAE,CACrB,CAAA;IACH,CAAC;CACF;AA5DD,qCA4DC"}
@@ -1,10 +0,0 @@
1
- import { StaticUrls } from "@norskvideo/norsk-studio/lib/extension/client-types";
2
- import { StudioNdiSource } from "./runtime";
3
- type SourceSelectionProps = {
4
- defaultValue?: StudioNdiSource;
5
- id: string;
6
- onChanged: (value: StudioNdiSource) => void;
7
- urls?: StaticUrls;
8
- };
9
- declare function SourceSelection(props: SourceSelectionProps): import("react/jsx-runtime").JSX.Element;
10
- export default SourceSelection;
@@ -1,84 +0,0 @@
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 creatable_1 = __importDefault(require("react-select/creatable"));
9
- function SourceSelection(props) {
10
- const [loading, setLoading] = (0, react_1.useState)(true);
11
- const [sourcesD, setSourcesD] = (0, react_1.useState)([]);
12
- const [options, setOptions] = (0, react_1.useState)([]);
13
- const [input, setInput] = (0, react_1.useState)(props.defaultValue || { name: "", url: "" });
14
- const isMounted = (0, react_1.useRef)(true);
15
- (0, react_1.useEffect)(() => {
16
- if (props.defaultValue) {
17
- props.onChanged(props.defaultValue);
18
- }
19
- }, [props.defaultValue]);
20
- (0, react_1.useEffect)(() => {
21
- const fetchSources = async () => {
22
- try {
23
- if (!props.urls?.staticUrl)
24
- return;
25
- const result = await fetch(`${props.urls.staticUrl}/sources`);
26
- if (isMounted.current && result.ok && result.body) {
27
- const sources = await result.json();
28
- const studioSources = sources.map((source) => ({ ...source, created: false }));
29
- if (props.defaultValue !== undefined) {
30
- if (props.defaultValue !== undefined && sources.find(({ url }) => url == props.defaultValue?.url) === undefined) {
31
- studioSources.push({ url: props.defaultValue.url, name: props.defaultValue.name, created: true });
32
- }
33
- }
34
- const options = sources.map((o) => ({
35
- value: o.url,
36
- label: o.name,
37
- }));
38
- setSourcesD(studioSources);
39
- setOptions(options);
40
- setLoading(false);
41
- }
42
- else {
43
- const text = await result.text();
44
- throw new Error(text);
45
- }
46
- }
47
- catch (err) {
48
- console.error(err);
49
- }
50
- };
51
- fetchSources().catch(console.error);
52
- const interval = setInterval(() => { fetchSources().catch(console.error); }, 500);
53
- return () => {
54
- clearInterval(interval);
55
- };
56
- }, [props.defaultValue, props.urls?.staticUrl]);
57
- const classNames = (0, react_1.useMemo)(() => ({
58
- control: () => "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded focus:ring-blue-500 focus:border-blue-500 p-1 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
59
- singleValue: () => "node-edit-select-input",
60
- option: () => "node-edit-select-input",
61
- menu: () => "bg-gray-50 dark:bg-gray-700 p-1"
62
- }), []);
63
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: loading ?
64
- (0, jsx_runtime_1.jsx)("div", { children: "Loading..." })
65
- :
66
- (0, jsx_runtime_1.jsx)(creatable_1.default, { options: options, value: input ? { value: input.url, label: input.name } : null, isClearable: true, onChange: (selected) => {
67
- if (selected) {
68
- const source = sourcesD.find(({ url }) => url == selected.value);
69
- if (source) {
70
- setInput(source);
71
- props.onChanged(source);
72
- }
73
- }
74
- }, onCreateOption: (newInput) => {
75
- const newSource = { name: newInput, url: newInput, created: true };
76
- const newOption = { label: newInput, value: newInput, created: true };
77
- setSourcesD((prev) => [...prev, newSource]);
78
- setOptions((prev) => [...prev, newOption]);
79
- setInput(newSource);
80
- props.onChanged(newSource);
81
- }, placeholder: "Select or type...", classNames: classNames, unstyled: true }) });
82
- }
83
- exports.default = SourceSelection;
84
- //# sourceMappingURL=source-selection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-selection.js","sourceRoot":"","sources":["../../src/input.ndi/source-selection.tsx"],"names":[],"mappings":";;;;;;AACA,iCAA6D;AAC7D,uEAAqD;AAUrD,SAAS,eAAe,CAAC,KAA2B;IAClD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAoB,EAAE,CAAC,CAAC;IAChE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAoC,EAAE,CAAC,CAAC;IAC9E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,YAAY,IAAI,EAAC,IAAI,EAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAC,CAAC,CAAC;IAC7E,MAAM,SAAS,GAAG,IAAA,cAAM,EAAC,IAAI,CAAC,CAAC;IAE/B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACvB,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAEzB,IAAA,iBAAS,EAAC,GAAG,EAAE;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AAW,QACX,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;wBACrB,IAAI,QAAQ,EAAE,CAAC;4BACb,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;4BACjE,IAAI,MAAM,EAAE,CAAC;gCACX,QAAQ,CAAC,MAAM,CAAC,CAAC;gCACjB,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;4BAC1B,CAAC;wBACH,CAAC;oBACH,CAAC,EACD,cAAc,EAAE,CAAC,QAAgB,EAAE,EAAE;wBACnC,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wBACnE,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wBACtE,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;wBAC5C,UAAU,CAAC,CAAC,IAAI,EAAC,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;wBAC1C,QAAQ,CAAC,SAAS,CAAC,CAAC;wBACpB,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;oBAC7B,CAAC,EACD,WAAW,EAAC,mBAAmB,EAC/B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,IAAI,GACd,GAEH,CAAC;AACN,CAAC;AAED,kBAAe,eAAe,CAAC"}
@@ -1,52 +0,0 @@
1
- export interface paths {
2
- "/sources": {
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
- "application/json": components["schemas"]["ndiSource"][];
24
- };
25
- };
26
- };
27
- };
28
- put?: never;
29
- post?: never;
30
- delete?: never;
31
- options?: never;
32
- head?: never;
33
- patch?: never;
34
- trace?: never;
35
- };
36
- }
37
- export type webhooks = Record<string, never>;
38
- export interface components {
39
- schemas: {
40
- ndiSource: {
41
- name: string;
42
- url: string;
43
- };
44
- };
45
- responses: never;
46
- parameters: never;
47
- requestBodies: never;
48
- headers: never;
49
- pathItems: never;
50
- }
51
- export type $defs = Record<string, never>;
52
- export type operations = Record<string, never>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/input.ndi/types.ts"],"names":[],"mappings":""}
@@ -1,37 +0,0 @@
1
- openapi: 3.0.0
2
- info:
3
- title: NDI Ingests
4
- version: 1.0.0
5
-
6
- paths:
7
- # Static paths (available at runtime and design time)
8
- /sources:
9
- get:
10
- summary: Return the currently available NDI sources
11
- description: Returns all discovered NDI sources
12
- x-route-type: static
13
- responses:
14
- 200:
15
- description: Successful operation
16
- content:
17
- application/json:
18
- schema:
19
- type: array
20
- description: A list of the sources available
21
- items:
22
- $ref: "#/components/schemas/ndiSource"
23
- components:
24
- schemas:
25
- ndiSource:
26
- type: object
27
- properties:
28
- name:
29
- type: string
30
- description: NDI Name
31
- url:
32
- type: string
33
- description: NDI Url
34
- required:
35
- - name
36
- - url
37
-
@@ -1,16 +0,0 @@
1
- import type { NdiOutputSettings } from "./runtime";
2
- import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
3
- export default function (R: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<NdiOutputSettings, {
4
- jitterBuffer: {
5
- target: number;
6
- value: number;
7
- percentage: number;
8
- };
9
- }, Record<string, never>, {
10
- type: "jitter-buffer-updated";
11
- buffer: {
12
- target: number;
13
- value: number;
14
- percentage: number;
15
- };
16
- }>;
@@ -1,63 +0,0 @@
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
- exports.default = default_1;
7
- const jitter_buffer_inline_1 = require("@norskvideo/norsk-studio-built-ins/lib/shared/jitter-buffer-inline");
8
- const jitter_buffer_config_1 = __importDefault(require("@norskvideo/norsk-studio-built-ins/lib/shared/jitter-buffer-config"));
9
- const util_1 = require("@norskvideo/norsk-studio/lib/shared/util");
10
- const inline_view_1 = __importDefault(require("./inline-view"));
11
- function default_1(R) {
12
- const { defineComponent, All, } = R;
13
- return defineComponent({
14
- identifier: 'output.ndi',
15
- category: 'output',
16
- name: "NDI Egest",
17
- description: "This component outputs a single video and/or audio stream over NDI.",
18
- subscription: {
19
- accepts: {
20
- type: 'dynamic-streams',
21
- mode: 'any',
22
- streams: () => All.map((media) => ({ media }))
23
- },
24
- },
25
- runtime: {
26
- initialState: () => ({
27
- jitterBuffer: (0, jitter_buffer_inline_1.initialJitterBufferState)()
28
- }),
29
- handleEvent(ev, state) {
30
- const evType = ev.type;
31
- switch (evType) {
32
- case 'jitter-buffer-updated':
33
- state.jitterBuffer = ev.buffer;
34
- break;
35
- default:
36
- (0, util_1.assertUnreachable)(evType);
37
- }
38
- return { ...state };
39
- },
40
- inline: inline_view_1.default,
41
- metrics: []
42
- },
43
- display: (desc) => {
44
- return {
45
- name: desc.config.name,
46
- groups: desc.config.groups?.toString() ?? 'none',
47
- bufferDelayMs: desc.config.jitterBuffer?.bufferDelayMs?.toString() ?? 'none'
48
- };
49
- },
50
- configForm: {
51
- form: {
52
- name: { help: "The NDI name announced for this output", hint: { type: 'text' } },
53
- groups: { help: "The NDI groups that this output is a member of", hint: { type: 'text' } },
54
- jitterBuffer: (0, jitter_buffer_config_1.default)(R),
55
- notes: {
56
- help: "Additional notes about this component",
57
- hint: { type: 'text', optional: true }
58
- },
59
- }
60
- }
61
- });
62
- }
63
- //# sourceMappingURL=info.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/output.ndi/info.ts"],"names":[],"mappings":";;;;;AAOA,4BA2DC;AAlED,6GAA8G;AAC9G,8HAAkG;AAGlG,mEAA6E;AAC7E,gEAAuC;AAEvC,mBAAwB,CAAe;IACrC,MAAM,EACJ,eAAe,EACf,GAAG,GACJ,GAAG,CAAC,CAAC;IACN,OAAO,eAAe,CAAoD;QACxE,UAAU,EAAE,YAAY;QACxB,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,qEAAqE;QAElF,YAAY,EAAE;YAGZ,OAAO,EAAE;gBACP,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,KAAK;gBACX,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;aAC/C;SACF;QACD,OAAO,EAAE;YACP,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC;gBACnB,YAAY,EAAE,IAAA,+CAAwB,GAAE;aACzC,CAAC;YACF,WAAW,CAAC,EAAE,EAAE,KAAK;gBACnB,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC;gBACvB,QAAQ,MAAM,EAAE,CAAC;oBACf,KAAK,uBAAuB;wBAC1B,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC,MAAM,CAAC;wBAC/B,MAAM;oBACR;wBACE,IAAA,wBAAiB,EAAC,MAAM,CAAC,CAAA;gBAC7B,CAAC;gBACD,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;YACtB,CAAC;YACD,MAAM,EAAE,qBAAU;YAClB,OAAO,EAAE,EAER;SACF;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YAChB,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;gBACtB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,MAAM;gBAChD,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,MAAM;aAC7E,CAAA;QACH,CAAC;QACD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,EAAE,IAAI,EAAE,wCAAwC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;gBAChF,MAAM,EAAE,EAAE,IAAI,EAAE,gDAAgD,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;gBAC1F,YAAY,EAAE,IAAA,8BAAgB,EAAC,CAAC,CAAC;gBACjC,KAAK,EAAE;oBACL,IAAI,EAAE,uCAAuC;oBAC7C,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;iBACvC;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- import { NdiState } from "./runtime";
3
- declare function InlineView({ state }: {
4
- state: NdiState;
5
- }): React.JSX.Element;
6
- export default InlineView;
@@ -1,12 +0,0 @@
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 jitter_buffer_inline_1 = __importDefault(require("@norskvideo/norsk-studio-built-ins/lib/shared/jitter-buffer-inline"));
8
- function InlineView({ state }) {
9
- return ((0, jsx_runtime_1.jsx)("div", { className: "srt-output", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(jitter_buffer_inline_1.default, { ...state.jitterBuffer }) }) }));
10
- }
11
- exports.default = InlineView;
12
- //# sourceMappingURL=inline-view.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inline-view.js","sourceRoot":"","sources":["../../src/output.ndi/inline-view.tsx"],"names":[],"mappings":";;;;;;AAEA,8HAAoG;AAEpG,SAAS,UAAU,CAAC,EAAE,KAAK,EAAuB;IAChD,OAAO,CACL,gCAAK,SAAS,EAAC,YAAY,YACzB,0CACE,uBAAC,8BAAkB,OAAK,KAAK,CAAC,YAAY,GAAI,GAC1C,GACF,CACP,CAAC;AACJ,CAAC;AAED,kBAAe,UAAU,CAAC"}
@@ -1,14 +0,0 @@
1
- import { Norsk, NdiOutputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
2
- import { OnCreated, ServerComponentDefinition, ServerComponentSchemas, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
3
- import { SimpleSinkWrapper } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
4
- import type { components } from './types';
5
- export type NdiOutputSettings = components['schemas']['Config'] & Pick<SdkSettings, 'name' | 'groups'>;
6
- export type NdiState = components['schemas']['State'];
7
- export type NdiCommand = components['schemas']['Commands'];
8
- export type NdiEvent = components['schemas']['Events'];
9
- export type NdiComponent = SimpleSinkWrapper<NdiState, NdiCommand, NdiEvent>;
10
- export default class NdiOutputDefinition implements ServerComponentDefinition<NdiOutputSettings, NdiComponent, NdiState, NdiCommand, NdiEvent> {
11
- create(norsk: Norsk, cfg: NdiOutputSettings, cb: OnCreated<NdiComponent>, runtime: StudioRuntime<NdiState, NdiCommand, NdiEvent>): Promise<void>;
12
- handleMetricsUpdate(c: NdiComponent): Promise<void>;
13
- schemas(): Promise<ServerComponentSchemas>;
14
- }
@@ -1,35 +0,0 @@
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 base_nodes_1 = require("@norskvideo/norsk-studio/lib/extension/base-nodes");
7
- const jitter_buffer_inline_1 = require("@norskvideo/norsk-studio-built-ins/lib/shared/jitter-buffer-inline");
8
- const schemas_1 = require("../shared/schemas");
9
- const path_1 = __importDefault(require("path"));
10
- class NdiOutputDefinition {
11
- async create(norsk, cfg, cb, runtime) {
12
- const wrapper = new base_nodes_1.SimpleSinkWrapper(cfg.id, async () => {
13
- return await norsk.output.ndi(cfg);
14
- }, runtime.updates);
15
- await wrapper.initialised;
16
- cb(wrapper);
17
- }
18
- async handleMetricsUpdate(c) {
19
- const latest = c._updates?.latestMetrics();
20
- if (!latest)
21
- return;
22
- c._updates?.raiseEvent({
23
- type: 'jitter-buffer-updated',
24
- buffer: (0, jitter_buffer_inline_1.extractJitterBufferFromMetrics)(latest)
25
- });
26
- }
27
- async schemas() {
28
- return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), {
29
- config: 'Config',
30
- state: 'State'
31
- });
32
- }
33
- }
34
- exports.default = NdiOutputDefinition;
35
- //# sourceMappingURL=runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/output.ndi/runtime.ts"],"names":[],"mappings":";;;;;AAEA,kFAAsF;AACtF,6GAAoH;AACpH,+CAAoD;AACpD,gDAAwB;AAaxB,MAAqB,mBAAmB;IACtC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAsB,EAAE,EAA2B,EAAE,OAAsD;QACpI,MAAM,OAAO,GAAG,IAAI,8BAAiB,CAAiC,GAAG,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;YACvF,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACrC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;QACnB,MAAM,OAAO,CAAC,WAAW,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,CAAC;IACd,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,CAAe;QACvC,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC;QAC3C,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC;YACrB,IAAI,EAAE,uBAAuB;YAC7B,MAAM,EAAE,IAAA,qDAA8B,EAAC,MAAM,CAAC;SAC/C,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE;YACzD,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,OAAO;SACf,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,sCAwBC"}
@@ -1,56 +0,0 @@
1
- export type paths = Record<string, never>;
2
- export type webhooks = Record<string, never>;
3
- export interface components {
4
- schemas: {
5
- Config: {
6
- id: string;
7
- displayName: string;
8
- notes?: string;
9
- name: string;
10
- groups?: string[];
11
- jitterBuffer?: {
12
- bufferDelayMs?: number;
13
- minPeriodMs?: number;
14
- maxPeriodMs?: number;
15
- windowDuration?: number;
16
- maxSlope?: number;
17
- };
18
- };
19
- State: {
20
- jitterBuffer: {
21
- target: number;
22
- value: number;
23
- percentage: number;
24
- };
25
- };
26
- JitterBufferState: {
27
- target: number;
28
- value: number;
29
- percentage: number;
30
- };
31
- Commands: Record<string, never>;
32
- Events: {
33
- type: "jitter-buffer-updated";
34
- buffer: {
35
- target: number;
36
- value: number;
37
- percentage: number;
38
- };
39
- };
40
- JitterBufferUpdatedEvent: {
41
- type: "jitter-buffer-updated";
42
- buffer: {
43
- target: number;
44
- value: number;
45
- percentage: number;
46
- };
47
- };
48
- };
49
- responses: never;
50
- parameters: never;
51
- requestBodies: never;
52
- headers: never;
53
- pathItems: never;
54
- }
55
- export type $defs = Record<string, never>;
56
- export type operations = Record<string, never>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/output.ndi/types.ts"],"names":[],"mappings":""}
@@ -1,72 +0,0 @@
1
- openapi: 3.0.0
2
- info:
3
- title: NDI Output
4
- version: 1.0.0
5
-
6
- paths: {}
7
-
8
- components:
9
- schemas:
10
- Config:
11
- type: object
12
- required:
13
- - id
14
- - displayName
15
- - name
16
- properties:
17
- id:
18
- type: string
19
- displayName:
20
- type: string
21
- notes:
22
- type: string
23
- name:
24
- type: string
25
- groups:
26
- type: array
27
- items:
28
- type: string
29
- jitterBuffer:
30
- $ref: '../../../core/src/types.yaml#/components/schemas/JitterBufferConfig'
31
-
32
- State:
33
- type: object
34
- required:
35
- - jitterBuffer
36
- properties:
37
- jitterBuffer:
38
- $ref: '#/components/schemas/JitterBufferState'
39
-
40
- JitterBufferState:
41
- type: object
42
- required:
43
- - target
44
- - value
45
- - percentage
46
- properties:
47
- target:
48
- type: number
49
- value:
50
- type: number
51
- percentage:
52
- type: number
53
-
54
- Commands:
55
- type: object
56
- additionalProperties: false
57
-
58
- Events:
59
- oneOf:
60
- - $ref: '#/components/schemas/JitterBufferUpdatedEvent'
61
-
62
- JitterBufferUpdatedEvent:
63
- type: object
64
- required:
65
- - type
66
- - buffer
67
- properties:
68
- type:
69
- type: string
70
- enum: ['jitter-buffer-updated']
71
- buffer:
72
- $ref: '#/components/schemas/JitterBufferState'
@@ -1,77 +0,0 @@
1
- # This file has been generated, please edit types.source.yaml instead
2
-
3
- openapi: 3.0.0
4
- info:
5
- title: NDI Output
6
- version: 1.0.0
7
- paths: {}
8
- components:
9
- schemas:
10
- Config:
11
- type: object
12
- required:
13
- - id
14
- - displayName
15
- - name
16
- properties:
17
- id:
18
- type: string
19
- displayName:
20
- type: string
21
- notes:
22
- type: string
23
- name:
24
- type: string
25
- groups:
26
- type: array
27
- items:
28
- type: string
29
- jitterBuffer:
30
- type: object
31
- properties:
32
- bufferDelayMs:
33
- type: number
34
- minPeriodMs:
35
- type: number
36
- maxPeriodMs:
37
- type: number
38
- windowDuration:
39
- type: number
40
- maxSlope:
41
- type: number
42
- State:
43
- type: object
44
- required:
45
- - jitterBuffer
46
- properties:
47
- jitterBuffer: &a1
48
- type: object
49
- required:
50
- - target
51
- - value
52
- - percentage
53
- properties:
54
- target:
55
- type: number
56
- value:
57
- type: number
58
- percentage:
59
- type: number
60
- JitterBufferState: *a1
61
- Commands:
62
- type: object
63
- additionalProperties: false
64
- Events:
65
- oneOf:
66
- - &a2
67
- type: object
68
- required:
69
- - type
70
- - buffer
71
- properties:
72
- type:
73
- type: string
74
- enum:
75
- - jitter-buffer-updated
76
- buffer: *a1
77
- JitterBufferUpdatedEvent: *a2
@@ -1,8 +0,0 @@
1
- import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
2
- export default function ({ defineComponent, }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<{
3
- id: string;
4
- displayName: string;
5
- systemInstruction: string;
6
- api: "live" | "traditional";
7
- notes?: string;
8
- }, object, object, object>;