@norskvideo/norsk-studio-built-ins 1.26.0-2025-02-24-f187dd83 → 1.26.0-2025-02-25-9514336c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/info.js +328 -159
- package/lib/info.js +23 -13
- package/lib/info.js.map +1 -1
- package/lib/output.autoCmaf/runtime.js +2 -7
- package/lib/output.autoCmaf/runtime.js.map +1 -1
- package/lib/output.facebook/info.d.ts +7 -0
- package/lib/output.facebook/info.js +31 -0
- package/lib/output.facebook/info.js.map +1 -0
- package/lib/output.facebook/runtime.d.ts +12 -0
- package/lib/output.facebook/runtime.js +20 -0
- package/lib/output.facebook/runtime.js.map +1 -0
- package/lib/output.facebook/types.d.ts +19 -0
- package/lib/output.facebook/types.js +3 -0
- package/lib/output.facebook/types.js.map +1 -0
- package/lib/output.facebook/types.yaml +19 -0
- package/lib/output.linkedin/info.d.ts +7 -0
- package/lib/output.linkedin/info.js +31 -0
- package/lib/output.linkedin/info.js.map +1 -0
- package/lib/output.linkedin/runtime.d.ts +12 -0
- package/lib/output.linkedin/runtime.js +20 -0
- package/lib/output.linkedin/runtime.js.map +1 -0
- package/lib/output.linkedin/types.d.ts +19 -0
- package/lib/output.linkedin/types.js +3 -0
- package/lib/output.linkedin/types.js.map +1 -0
- package/lib/output.linkedin/types.yaml +19 -0
- package/lib/output.rtmp/info.d.ts +9 -2
- package/lib/output.rtmp/info.js +25 -20
- package/lib/output.rtmp/info.js.map +1 -1
- package/lib/output.rtmp/inline-view.d.ts +3 -2
- package/lib/output.rtmp/inline-view.js.map +1 -1
- package/lib/output.rtmp/runtime.d.ts +23 -11
- package/lib/output.rtmp/runtime.js +92 -92
- package/lib/output.rtmp/runtime.js.map +1 -1
- package/lib/output.rtmp/summary-view.d.ts +3 -3
- package/lib/output.rtmp/summary-view.js.map +1 -1
- package/lib/output.twitch/info.d.ts +7 -0
- package/lib/output.twitch/info.js +31 -0
- package/lib/output.twitch/info.js.map +1 -0
- package/lib/output.twitch/runtime.d.ts +12 -0
- package/lib/output.twitch/runtime.js +20 -0
- package/lib/output.twitch/runtime.js.map +1 -0
- package/lib/output.twitch/types.d.ts +19 -0
- package/lib/output.twitch/types.js +3 -0
- package/lib/output.twitch/types.js.map +1 -0
- package/lib/output.twitch/types.yaml +19 -0
- package/lib/output.youtube/info.d.ts +7 -0
- package/lib/output.youtube/info.js +31 -0
- package/lib/output.youtube/info.js.map +1 -0
- package/lib/output.youtube/runtime.d.ts +12 -0
- package/lib/output.youtube/runtime.js +20 -0
- package/lib/output.youtube/runtime.js.map +1 -0
- package/lib/output.youtube/types.d.ts +19 -0
- package/lib/output.youtube/types.js +3 -0
- package/lib/output.youtube/types.js.map +1 -0
- package/lib/output.youtube/types.yaml +19 -0
- package/lib/processor.audioEncoder/info.d.ts +9 -2
- package/lib/processor.audioEncoder/runtime.d.ts +7 -16
- package/lib/processor.audioEncoder/runtime.js +8 -0
- package/lib/processor.audioEncoder/runtime.js.map +1 -1
- package/lib/processor.audioEncoder/types.d.ts +34 -0
- package/lib/processor.audioEncoder/types.js +3 -0
- package/lib/processor.audioEncoder/types.js.map +1 -0
- package/lib/processor.audioEncoder/types.yaml +103 -0
- package/lib/processor.fixedLadder/runtime.d.ts +2 -2
- package/lib/processor.fixedLadder/runtime.js +2 -9
- package/lib/processor.fixedLadder/runtime.js.map +1 -1
- package/lib/processor.videoDecoder/info.d.ts +3 -0
- package/lib/processor.videoDecoder/info.js +48 -0
- package/lib/processor.videoDecoder/info.js.map +1 -0
- package/lib/processor.videoDecoder/runtime.d.ts +12 -0
- package/lib/processor.videoDecoder/runtime.js +17 -0
- package/lib/processor.videoDecoder/runtime.js.map +1 -0
- package/lib/shared/schemas.d.ts +8 -0
- package/lib/shared/schemas.js +19 -0
- package/lib/shared/schemas.js.map +1 -0
- package/package.json +3 -3
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Norsk, RtmpOutputNode, RtmpOutputSettings as SdkSettings } from '@norskvideo/norsk-sdk';
|
2
|
-
import { CreatedMediaNode, InstanceRouteInfo, OnCreated, ServerComponentDefinition, StudioNodeSubscriptionSource, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
3
|
-
import {
|
2
|
+
import { CreatedMediaNode, InstanceRouteInfo, OnCreated, RelatedMediaNodes, ServerComponentDefinition, StudioNodeSubscriptionSource, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
3
|
+
import { SubscriptionOpts } from '@norskvideo/norsk-studio/lib/extension/base-nodes';
|
4
4
|
import { ContextPromiseControl } from '@norskvideo/norsk-studio/lib/runtime/util';
|
5
|
+
import { BaseConfig } from '@norskvideo/norsk-studio/lib/extension/client-types';
|
5
6
|
export type RtmpOutputSettings = {
|
6
7
|
id: string;
|
7
8
|
displayName: string;
|
@@ -26,24 +27,35 @@ export type RtmpOutputEvent = {
|
|
26
27
|
export type RtmpOutputCommand = {
|
27
28
|
type: "enable-output" | "disable-output";
|
28
29
|
};
|
29
|
-
declare class
|
30
|
+
export declare abstract class BaseRtmpOutputDefinition<Settings extends BaseConfig> implements ServerComponentDefinition<Settings, RtmpOutput, RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent> {
|
31
|
+
abstract getConfig(input: Settings): Promise<SdkSettings>;
|
32
|
+
create(norsk: Norsk, cfg: Settings, cb: OnCreated<RtmpOutput>, runtime: StudioRuntime<RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent>): Promise<void>;
|
33
|
+
handleCommand(node: RtmpOutput, command: RtmpOutputCommand): Promise<void>;
|
34
|
+
instanceRoutes(): Promise<InstanceRouteInfo<Settings, RtmpOutput, RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent>[]>;
|
35
|
+
}
|
36
|
+
export default class RtmpOutputDefinition extends BaseRtmpOutputDefinition<RtmpOutputSettings> {
|
37
|
+
getConfig(cfg: RtmpOutputSettings): Promise<{
|
38
|
+
url: string;
|
39
|
+
bufferDelayMs: number | undefined;
|
40
|
+
avDelayMs: number | undefined;
|
41
|
+
retryConnectionTimeout: number | undefined;
|
42
|
+
}>;
|
43
|
+
}
|
44
|
+
export declare class RtmpOutput implements CreatedMediaNode {
|
30
45
|
initialised: Promise<void>;
|
31
46
|
norsk: Norsk;
|
32
47
|
runtime: StudioRuntime<RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent>;
|
33
|
-
cfg:
|
48
|
+
cfg: BaseConfig;
|
34
49
|
rtmp?: RtmpOutputNode;
|
35
50
|
enabled: boolean;
|
36
51
|
control: ContextPromiseControl;
|
52
|
+
relatedMediaNodes: RelatedMediaNodes;
|
53
|
+
id: string;
|
54
|
+
fn: () => Promise<SdkSettings>;
|
37
55
|
currentSources: Map<CreatedMediaNode, StudioNodeSubscriptionSource>;
|
38
|
-
constructor(norsk: Norsk, runtime: StudioRuntime<RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent>, cfg:
|
56
|
+
constructor(norsk: Norsk, runtime: StudioRuntime<RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent>, cfg: BaseConfig, fn: () => Promise<SdkSettings>);
|
39
57
|
enableOutput(): Promise<void>;
|
40
58
|
disableOutput(): Promise<void>;
|
41
59
|
subscribe(sources: StudioNodeSubscriptionSource[], _opts?: SubscriptionOpts): void;
|
42
60
|
subscribeImpl(sources: StudioNodeSubscriptionSource[]): Promise<void>;
|
43
61
|
}
|
44
|
-
export default class RtmpOutputDefinition implements ServerComponentDefinition<RtmpOutputSettings, RtmpOutput, RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent> {
|
45
|
-
create(norsk: Norsk, cfg: RtmpOutputSettings, cb: OnCreated<RtmpOutput>, runtime: StudioRuntime<RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent>): Promise<void>;
|
46
|
-
handleCommand(node: RtmpOutput, command: RtmpOutputCommand): Promise<void>;
|
47
|
-
instanceRoutes(): Promise<InstanceRouteInfo<RtmpOutputSettings, RtmpOutput, RtmpOutputState, RtmpOutputCommand, RtmpOutputEvent>[]>;
|
48
|
-
}
|
49
|
-
export {};
|
@@ -3,15 +3,95 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.RtmpOutput = exports.BaseRtmpOutputDefinition = void 0;
|
6
7
|
const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
|
7
|
-
const
|
8
|
+
const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-types");
|
8
9
|
const util_1 = require("@norskvideo/norsk-studio/lib/runtime/util");
|
9
10
|
const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
|
10
11
|
const json_refs_1 = require("json-refs");
|
11
12
|
const promises_1 = __importDefault(require("fs/promises"));
|
12
13
|
const path_1 = __importDefault(require("path"));
|
13
14
|
const yaml_1 = __importDefault(require("yaml"));
|
14
|
-
|
15
|
+
const api_1 = require("../shared/api");
|
16
|
+
class BaseRtmpOutputDefinition {
|
17
|
+
async create(norsk, cfg, cb, runtime) {
|
18
|
+
const node = new RtmpOutput(norsk, runtime, cfg, async () => this.getConfig(cfg));
|
19
|
+
await node.initialised;
|
20
|
+
cb(node);
|
21
|
+
}
|
22
|
+
async handleCommand(node, command) {
|
23
|
+
switch (command.type) {
|
24
|
+
case 'enable-output':
|
25
|
+
await node.enableOutput();
|
26
|
+
break;
|
27
|
+
case 'disable-output':
|
28
|
+
await node.disableOutput();
|
29
|
+
break;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
async instanceRoutes() {
|
33
|
+
const types = await promises_1.default.readFile(path_1.default.join(__dirname, 'types.yaml'));
|
34
|
+
const root = yaml_1.default.parse(types.toString());
|
35
|
+
const resolved = await (0, json_refs_1.resolveRefs)(root, {}).then((r) => r.resolved);
|
36
|
+
const paths = resolved.paths;
|
37
|
+
return [
|
38
|
+
{
|
39
|
+
...(0, api_1.post)('/enable', paths),
|
40
|
+
handler: ({ runtime }) => async (_req, res) => {
|
41
|
+
try {
|
42
|
+
const state = runtime.updates.latest();
|
43
|
+
if (state.enabled) {
|
44
|
+
return res.status(400).json({ error: 'Output is already enabled' });
|
45
|
+
}
|
46
|
+
runtime.updates.sendCommand({
|
47
|
+
type: 'enable-output'
|
48
|
+
});
|
49
|
+
res.sendStatus(204);
|
50
|
+
}
|
51
|
+
catch (error) {
|
52
|
+
console.error('Error in enable handler:', error);
|
53
|
+
res.status(500).json({ error: 'Failed to enable output' });
|
54
|
+
}
|
55
|
+
}
|
56
|
+
},
|
57
|
+
{
|
58
|
+
...(0, api_1.post)('/disable', paths),
|
59
|
+
handler: ({ runtime }) => async (_req, res) => {
|
60
|
+
try {
|
61
|
+
const state = runtime.updates.latest();
|
62
|
+
if (!state.enabled) {
|
63
|
+
return res.status(400).json({ error: 'Output is already disabled' });
|
64
|
+
}
|
65
|
+
runtime.updates.sendCommand({
|
66
|
+
type: 'disable-output'
|
67
|
+
});
|
68
|
+
res.sendStatus(204);
|
69
|
+
}
|
70
|
+
catch (error) {
|
71
|
+
console.error('Error in disable handler:', error);
|
72
|
+
res.status(500).json({ error: 'Failed to disable output' });
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
];
|
77
|
+
}
|
78
|
+
}
|
79
|
+
exports.BaseRtmpOutputDefinition = BaseRtmpOutputDefinition;
|
80
|
+
function assertUnreachable(_) {
|
81
|
+
throw new Error("Didn't expect to get here");
|
82
|
+
}
|
83
|
+
class RtmpOutputDefinition extends BaseRtmpOutputDefinition {
|
84
|
+
async getConfig(cfg) {
|
85
|
+
return {
|
86
|
+
url: cfg.url,
|
87
|
+
bufferDelayMs: cfg.bufferDelayMs,
|
88
|
+
avDelayMs: cfg.avDelayMs,
|
89
|
+
retryConnectionTimeout: cfg.retryConnectionTimeout,
|
90
|
+
};
|
91
|
+
}
|
92
|
+
}
|
93
|
+
exports.default = RtmpOutputDefinition;
|
94
|
+
class RtmpOutput {
|
15
95
|
initialised;
|
16
96
|
norsk;
|
17
97
|
runtime;
|
@@ -19,10 +99,14 @@ class RtmpOutput extends base_nodes_1.CustomSinkNode {
|
|
19
99
|
rtmp;
|
20
100
|
enabled = true;
|
21
101
|
control = new util_1.ContextPromiseControl(this.subscribeImpl.bind(this));
|
102
|
+
relatedMediaNodes = new runtime_types_1.RelatedMediaNodes();
|
103
|
+
id;
|
104
|
+
fn;
|
22
105
|
currentSources = new Map();
|
23
|
-
constructor(norsk, runtime, cfg) {
|
24
|
-
|
106
|
+
constructor(norsk, runtime, cfg, fn) {
|
107
|
+
this.id = cfg.id;
|
25
108
|
this.cfg = cfg;
|
109
|
+
this.fn = fn;
|
26
110
|
this.norsk = norsk;
|
27
111
|
this.runtime = runtime;
|
28
112
|
this.initialised = Promise.resolve();
|
@@ -71,12 +155,9 @@ class RtmpOutput extends base_nodes_1.CustomSinkNode {
|
|
71
155
|
}
|
72
156
|
if (subscriptions.length > 0) {
|
73
157
|
if (!this.rtmp) {
|
158
|
+
const settings = await this.fn();
|
74
159
|
const rtmpCfg = {
|
75
160
|
id: this.cfg.id,
|
76
|
-
url: this.cfg.url,
|
77
|
-
bufferDelayMs: this.cfg.bufferDelayMs,
|
78
|
-
avDelayMs: this.cfg.avDelayMs,
|
79
|
-
retryConnectionTimeout: this.cfg.retryConnectionTimeout,
|
80
161
|
onPublishStart: () => {
|
81
162
|
this.runtime.updates.clearAlert('connection-error');
|
82
163
|
this.runtime.updates.raiseEvent({ type: "rtmp-server-connected-and-publishing" });
|
@@ -90,10 +171,10 @@ class RtmpOutput extends base_nodes_1.CustomSinkNode {
|
|
90
171
|
default:
|
91
172
|
assertUnreachable(reason);
|
92
173
|
}
|
93
|
-
}
|
174
|
+
},
|
175
|
+
...settings
|
94
176
|
};
|
95
177
|
this.rtmp = await this.norsk.output.rtmp(rtmpCfg);
|
96
|
-
this.setup({ sink: this.rtmp, updates: this.runtime.updates }, { requireOneOfEverything: true });
|
97
178
|
}
|
98
179
|
this.rtmp.subscribe(subscriptions, (ctx) => {
|
99
180
|
return ctx.streams.length === subscriptions.length;
|
@@ -105,86 +186,5 @@ class RtmpOutput extends base_nodes_1.CustomSinkNode {
|
|
105
186
|
}
|
106
187
|
}
|
107
188
|
}
|
108
|
-
|
109
|
-
return {
|
110
|
-
url: path,
|
111
|
-
summary: op.summary,
|
112
|
-
description: op.description,
|
113
|
-
requestBody: op.requestBody,
|
114
|
-
responses: op.responses,
|
115
|
-
};
|
116
|
-
}
|
117
|
-
function post(path, paths) {
|
118
|
-
return {
|
119
|
-
...coreInfo(path, paths[path]['post']),
|
120
|
-
method: 'POST',
|
121
|
-
};
|
122
|
-
}
|
123
|
-
class RtmpOutputDefinition {
|
124
|
-
async create(norsk, cfg, cb, runtime) {
|
125
|
-
const node = new RtmpOutput(norsk, runtime, cfg);
|
126
|
-
await node.initialised;
|
127
|
-
cb(node);
|
128
|
-
}
|
129
|
-
async handleCommand(node, command) {
|
130
|
-
switch (command.type) {
|
131
|
-
case 'enable-output':
|
132
|
-
await node.enableOutput();
|
133
|
-
break;
|
134
|
-
case 'disable-output':
|
135
|
-
await node.disableOutput();
|
136
|
-
break;
|
137
|
-
}
|
138
|
-
}
|
139
|
-
async instanceRoutes() {
|
140
|
-
const types = await promises_1.default.readFile(path_1.default.join(__dirname, 'types.yaml'));
|
141
|
-
const root = yaml_1.default.parse(types.toString());
|
142
|
-
const resolved = await (0, json_refs_1.resolveRefs)(root, {}).then((r) => r.resolved);
|
143
|
-
const paths = resolved.paths;
|
144
|
-
return [
|
145
|
-
{
|
146
|
-
...post('/enable', paths),
|
147
|
-
handler: ({ runtime }) => async (_req, res) => {
|
148
|
-
try {
|
149
|
-
const state = runtime.updates.latest();
|
150
|
-
if (state.enabled) {
|
151
|
-
return res.status(400).json({ error: 'Output is already enabled' });
|
152
|
-
}
|
153
|
-
runtime.updates.sendCommand({
|
154
|
-
type: 'enable-output'
|
155
|
-
});
|
156
|
-
res.sendStatus(204);
|
157
|
-
}
|
158
|
-
catch (error) {
|
159
|
-
console.error('Error in enable handler:', error);
|
160
|
-
res.status(500).json({ error: 'Failed to enable output' });
|
161
|
-
}
|
162
|
-
}
|
163
|
-
},
|
164
|
-
{
|
165
|
-
...post('/disable', paths),
|
166
|
-
handler: ({ runtime }) => async (_req, res) => {
|
167
|
-
try {
|
168
|
-
const state = runtime.updates.latest();
|
169
|
-
if (!state.enabled) {
|
170
|
-
return res.status(400).json({ error: 'Output is already disabled' });
|
171
|
-
}
|
172
|
-
runtime.updates.sendCommand({
|
173
|
-
type: 'disable-output'
|
174
|
-
});
|
175
|
-
res.sendStatus(204);
|
176
|
-
}
|
177
|
-
catch (error) {
|
178
|
-
console.error('Error in disable handler:', error);
|
179
|
-
res.status(500).json({ error: 'Failed to disable output' });
|
180
|
-
}
|
181
|
-
}
|
182
|
-
}
|
183
|
-
];
|
184
|
-
}
|
185
|
-
}
|
186
|
-
exports.default = RtmpOutputDefinition;
|
187
|
-
function assertUnreachable(_) {
|
188
|
-
throw new Error("Didn't expect to get here");
|
189
|
-
}
|
189
|
+
exports.RtmpOutput = RtmpOutput;
|
190
190
|
//# sourceMappingURL=runtime.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/output.rtmp/runtime.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/output.rtmp/runtime.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAsJ;AAEtJ,wFAAiN;AAEjN,oEAAkF;AAClF,yEAAuE;AACvE,yCAAwC;AAExC,2DAA6B;AAC7B,gDAAwB;AACxB,gDAAwB;AAExB,uCAAiD;AA8BjD,MAAsB,wBAAwB;IAG5C,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAa,EAAE,EAAyB,EAAE,OAA2E;QAC9I,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI,C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BACD,mBAAmB,EAAE,CAAC,MAAmC,EAAE,EAAE;wBAC3D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC;wBACpG,QAAQ,MAAM,EAAE,CAAC;4BACf,KAAK,uCAA2B,CAAC,yBAAyB;gCACxD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,qCAAqC,EAAE,CAAC,CAAA;gCAChF,MAAM;4BACR;gCACE,iBAAiB,CAAC,MAAM,CAAC,CAAA;wBAC7B,CAAC;oBACH,CAAC;oBACD,GAAG,QAAQ;iBACZ,CAAA;gBACD,IAAI,CAAC,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpD,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;gBACzC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,aAAa,CAAC,MAAM,CAAC;YACrD,CAAC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACxB,CAAC;IACH,CAAC;CACF;AA5GD,gCA4GC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
2
|
-
import { ViewProps } from "@norskvideo/norsk-studio/lib/extension/client-types";
|
3
|
-
declare function SummaryView({ state, sendCommand, }: ViewProps<
|
1
|
+
import type { RtmpOutputCommand, RtmpOutputState } from "./runtime";
|
2
|
+
import type { BaseConfig, ViewProps } from "@norskvideo/norsk-studio/lib/extension/client-types";
|
3
|
+
declare function SummaryView({ state, sendCommand, }: ViewProps<BaseConfig, RtmpOutputState, RtmpOutputCommand>): import("react/jsx-runtime").JSX.Element;
|
4
4
|
export default SummaryView;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"summary-view.js","sourceRoot":"","sources":["../../src/output.rtmp/summary-view.tsx"],"names":[],"mappings":";;;AAOA,SAAS,WAAW,CAAC,EACnB,KAAK,EACL,WAAW,
|
1
|
+
{"version":3,"file":"summary-view.js","sourceRoot":"","sources":["../../src/output.rtmp/summary-view.tsx"],"names":[],"mappings":";;;AAOA,SAAS,WAAW,CAAC,EACnB,KAAK,EACL,WAAW,GAC+C;IAE1D,MAAM,kBAAkB,GAAG,GAAS,EAAE;QACpC,KAAK,YAAY,EAAE,CAAC;IACtB,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;QAC9B,WAAW,CAAC;YACV,IAAI,EAAE,eAAe;SACtB,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,mBAAmB,GAAG,GAAS,EAAE;QACrC,KAAK,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;QAC/B,WAAW,CAAC;YACV,IAAI,EAAE,gBAAgB;SACvB,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACL,gCAAK,SAAS,EAAC,MAAM,YACnB,iCAAK,SAAS,EAAC,wCAAwC,aACrD,iCAAK,SAAS,EAAC,6BAA6B,aAC1C,iCACE,SAAS,EAAE,qCAAqC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAC9E,EAAE,GACE,EACR,kCAAM,SAAS,EAAC,SAAS,yBACd,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,IAC1C,IACH,EACN,0CACG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CACf,mCACE,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAC,kEAAkE,+BAGrE,CACV,CAAC,CAAC,CAAC,CACF,mCACE,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAC,oEAAoE,8BAGvE,CACV,GACG,IACF,GACF,CACP,CAAC;AACJ,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
|
2
|
+
export default function (r: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<{
|
3
|
+
id: string;
|
4
|
+
displayName: string;
|
5
|
+
streamKey: string;
|
6
|
+
notes?: string;
|
7
|
+
}, import("../output.rtmp/runtime").RtmpOutputState, import("../output.rtmp/runtime").RtmpOutputCommand, import("../output.rtmp/runtime").RtmpOutputEvent>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = default_1;
|
4
|
+
const info_1 = require("../output.rtmp/info");
|
5
|
+
function default_1(r) {
|
6
|
+
const { validation: { Z } } = r;
|
7
|
+
return (0, info_1.defineRtmpOutputComponent)(r, {
|
8
|
+
identifier: 'output.twitch',
|
9
|
+
name: "Twitch Live",
|
10
|
+
description: "Stream directly to Twitch using RTMP",
|
11
|
+
configForm: {
|
12
|
+
form: {
|
13
|
+
streamKey: {
|
14
|
+
help: "Twitch Stream Key (from Twitch Creator Dashboard)",
|
15
|
+
hint: {
|
16
|
+
type: 'text',
|
17
|
+
validation: Z.string().min(1),
|
18
|
+
}
|
19
|
+
},
|
20
|
+
notes: {
|
21
|
+
help: "Additional notes about this component",
|
22
|
+
hint: {
|
23
|
+
type: 'text',
|
24
|
+
optional: true
|
25
|
+
}
|
26
|
+
},
|
27
|
+
}
|
28
|
+
}
|
29
|
+
});
|
30
|
+
}
|
31
|
+
//# sourceMappingURL=info.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/output.twitch/info.ts"],"names":[],"mappings":";;AAIA,4BAyBC;AA7BD,8CAAgE;AAIhE,mBAAwB,CAAe;IACrC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAChC,OAAO,IAAA,gCAAyB,EAAuB,CAAC,EAAE;QACxD,UAAU,EAAE,eAAe;QAC3B,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,sCAAsC;QACnD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,SAAS,EAAE;oBACT,IAAI,EAAE,mDAAmD;oBACzD,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;qBAC9B;iBACF;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,uCAAuC;oBAC7C,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACf;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { components } from './types';
|
2
|
+
import { BaseRtmpOutputDefinition } from '../output.rtmp/runtime';
|
3
|
+
export type TwitchOutputSettings = components['schemas']['twitchOutputSettings'];
|
4
|
+
export default class TwitchOutputDefinition extends BaseRtmpOutputDefinition<TwitchOutputSettings> {
|
5
|
+
getConfig(cfg: TwitchOutputSettings): Promise<{
|
6
|
+
url: string;
|
7
|
+
}>;
|
8
|
+
schemas(): Promise<{
|
9
|
+
config: import("openapi-types").OpenAPIV3.SchemaObject | undefined;
|
10
|
+
state: import("openapi-types").OpenAPIV3.SchemaObject | undefined;
|
11
|
+
}>;
|
12
|
+
}
|
@@ -0,0 +1,20 @@
|
|
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 path_1 = __importDefault(require("path"));
|
7
|
+
const schemas_1 = require("../shared/schemas");
|
8
|
+
const runtime_1 = require("../output.rtmp/runtime");
|
9
|
+
class TwitchOutputDefinition extends runtime_1.BaseRtmpOutputDefinition {
|
10
|
+
async getConfig(cfg) {
|
11
|
+
return {
|
12
|
+
url: `rtmp://live.twitch.tv/app/${cfg.streamKey}`
|
13
|
+
};
|
14
|
+
}
|
15
|
+
async schemas() {
|
16
|
+
return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), { config: 'twitchOutputSettings' });
|
17
|
+
}
|
18
|
+
}
|
19
|
+
exports.default = TwitchOutputDefinition;
|
20
|
+
//# sourceMappingURL=runtime.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/output.twitch/runtime.ts"],"names":[],"mappings":";;;;;AACA,gDAAwB;AACxB,+CAAoD;AACpD,oDAAkE;AAIlE,MAAqB,sBAAuB,SAAQ,kCAA8C;IAChG,KAAK,CAAC,SAAS,CAAC,GAAyB;QACvC,OAAO;YACL,GAAG,EAAE,6BAA6B,GAAG,CAAC,SAAS,EAAE;SAClD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EACvD,EAAE,MAAM,EAAE,sBAAsB,EAAE,CACnC,CAAA;IACH,CAAC;CACF;AAZD,yCAYC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export type paths = Record<string, never>;
|
2
|
+
export type webhooks = Record<string, never>;
|
3
|
+
export interface components {
|
4
|
+
schemas: {
|
5
|
+
twitchOutputSettings: {
|
6
|
+
id: string;
|
7
|
+
displayName: string;
|
8
|
+
streamKey: string;
|
9
|
+
notes?: string;
|
10
|
+
};
|
11
|
+
};
|
12
|
+
responses: never;
|
13
|
+
parameters: never;
|
14
|
+
requestBodies: never;
|
15
|
+
headers: never;
|
16
|
+
pathItems: never;
|
17
|
+
}
|
18
|
+
export type $defs = Record<string, never>;
|
19
|
+
export type operations = Record<string, never>;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/output.twitch/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
openapi: 3.0.0
|
2
|
+
info:
|
3
|
+
title: Twitch Output Component
|
4
|
+
version: 1.0.0
|
5
|
+
components:
|
6
|
+
schemas:
|
7
|
+
twitchOutputSettings:
|
8
|
+
type: object
|
9
|
+
properties:
|
10
|
+
id:
|
11
|
+
type: string
|
12
|
+
displayName:
|
13
|
+
type: string
|
14
|
+
streamKey:
|
15
|
+
type: string
|
16
|
+
notes:
|
17
|
+
type: string
|
18
|
+
required: ['id', 'displayName', 'streamKey']
|
19
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
|
2
|
+
export default function (r: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<{
|
3
|
+
id: string;
|
4
|
+
displayName: string;
|
5
|
+
streamKey: string;
|
6
|
+
notes?: string;
|
7
|
+
}, import("../output.rtmp/runtime").RtmpOutputState, import("../output.rtmp/runtime").RtmpOutputCommand, import("../output.rtmp/runtime").RtmpOutputEvent>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = default_1;
|
4
|
+
const info_1 = require("../output.rtmp/info");
|
5
|
+
function default_1(r) {
|
6
|
+
const { validation: { Z } } = r;
|
7
|
+
return (0, info_1.defineRtmpOutputComponent)(r, {
|
8
|
+
identifier: 'output.youtube',
|
9
|
+
name: "YouTube Live",
|
10
|
+
description: "Stream directly to YouTube Live using RTMP",
|
11
|
+
configForm: {
|
12
|
+
form: {
|
13
|
+
streamKey: {
|
14
|
+
help: "YouTube Stream Key",
|
15
|
+
hint: {
|
16
|
+
type: 'text',
|
17
|
+
validation: Z.string().min(1),
|
18
|
+
}
|
19
|
+
},
|
20
|
+
notes: {
|
21
|
+
help: "Additional notes about this component",
|
22
|
+
hint: {
|
23
|
+
type: 'text',
|
24
|
+
optional: true
|
25
|
+
}
|
26
|
+
},
|
27
|
+
}
|
28
|
+
}
|
29
|
+
});
|
30
|
+
}
|
31
|
+
//# sourceMappingURL=info.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/output.youtube/info.ts"],"names":[],"mappings":";;AAIA,4BAyBC;AA7BD,8CAAgE;AAIhE,mBAAwB,CAAe;IACrC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAChC,OAAO,IAAA,gCAAyB,EAAwB,CAAC,EAAE;QACzD,UAAU,EAAE,gBAAgB;QAC5B,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,4CAA4C;QACzD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,SAAS,EAAE;oBACT,IAAI,EAAE,oBAAoB;oBAC1B,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;qBAC9B;iBACF;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,uCAAuC;oBAC7C,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,IAAI;qBACf;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { components } from './types';
|
2
|
+
import { BaseRtmpOutputDefinition } from '../output.rtmp/runtime';
|
3
|
+
export type YoutubeOutputSettings = components['schemas']['youtubeOutputSettings'];
|
4
|
+
export default class YoutubeOutputDefinition extends BaseRtmpOutputDefinition<YoutubeOutputSettings> {
|
5
|
+
getConfig(cfg: YoutubeOutputSettings): Promise<{
|
6
|
+
url: string;
|
7
|
+
}>;
|
8
|
+
schemas(): Promise<{
|
9
|
+
config: import("openapi-types").OpenAPIV3.SchemaObject | undefined;
|
10
|
+
state: import("openapi-types").OpenAPIV3.SchemaObject | undefined;
|
11
|
+
}>;
|
12
|
+
}
|
@@ -0,0 +1,20 @@
|
|
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 path_1 = __importDefault(require("path"));
|
7
|
+
const schemas_1 = require("../shared/schemas");
|
8
|
+
const runtime_1 = require("../output.rtmp/runtime");
|
9
|
+
class YoutubeOutputDefinition extends runtime_1.BaseRtmpOutputDefinition {
|
10
|
+
async getConfig(cfg) {
|
11
|
+
return {
|
12
|
+
url: `rtmps://x.rtmps.youtube.com:443/live2/${cfg.streamKey}`,
|
13
|
+
};
|
14
|
+
}
|
15
|
+
async schemas() {
|
16
|
+
return (0, schemas_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), { config: 'youtubeOutputSettings' });
|
17
|
+
}
|
18
|
+
}
|
19
|
+
exports.default = YoutubeOutputDefinition;
|
20
|
+
//# sourceMappingURL=runtime.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/output.youtube/runtime.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AAExB,+CAAoD;AACpD,oDAAkE;AAIlE,MAAqB,uBAAwB,SAAQ,kCAA+C;IAClG,KAAK,CAAC,SAAS,CAAC,GAA0B;QACxC,OAAO;YACL,GAAG,EAAE,yCAAyC,GAAG,CAAC,SAAS,EAAE;SAC9D,CAAA;IACH,CAAC;IAED,KAAK,CAAC,OAAO;QACX,OAAO,IAAA,yBAAe,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EACvD,EAAE,MAAM,EAAE,uBAAuB,EAAE,CACpC,CAAA;IACH,CAAC;CACF;AAZD,0CAYC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export type paths = Record<string, never>;
|
2
|
+
export type webhooks = Record<string, never>;
|
3
|
+
export interface components {
|
4
|
+
schemas: {
|
5
|
+
youtubeOutputSettings: {
|
6
|
+
id: string;
|
7
|
+
displayName: string;
|
8
|
+
streamKey: string;
|
9
|
+
notes?: string;
|
10
|
+
};
|
11
|
+
};
|
12
|
+
responses: never;
|
13
|
+
parameters: never;
|
14
|
+
requestBodies: never;
|
15
|
+
headers: never;
|
16
|
+
pathItems: never;
|
17
|
+
}
|
18
|
+
export type $defs = Record<string, never>;
|
19
|
+
export type operations = Record<string, never>;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/output.youtube/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
openapi: 3.0.0
|
2
|
+
info:
|
3
|
+
title: Youtube Output Component
|
4
|
+
version: 1.0.0
|
5
|
+
components:
|
6
|
+
schemas:
|
7
|
+
youtubeOutputSettings:
|
8
|
+
type: object
|
9
|
+
properties:
|
10
|
+
id:
|
11
|
+
type: string
|
12
|
+
displayName:
|
13
|
+
type: string
|
14
|
+
streamKey:
|
15
|
+
type: string
|
16
|
+
notes:
|
17
|
+
type: string
|
18
|
+
required: ['id', 'displayName', 'streamKey']
|
19
|
+
|