@norskvideo/norsk-studio-built-ins 1.0.0 → 1.0.1
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 +244 -80
- package/lib/info.js +8 -6
- package/lib/info.js.map +1 -1
- package/lib/processor.dynamicBug/bug-selection.d.ts +9 -0
- package/lib/processor.dynamicBug/bug-selection.js +39 -0
- package/lib/processor.dynamicBug/bug-selection.js.map +1 -0
- package/lib/processor.dynamicBug/info.d.ts +3 -0
- package/lib/processor.dynamicBug/info.js +102 -0
- package/lib/processor.dynamicBug/info.js.map +1 -0
- package/lib/processor.dynamicBug/runtime.d.ts +55 -0
- package/lib/processor.dynamicBug/runtime.js +156 -0
- package/lib/processor.dynamicBug/runtime.js.map +1 -0
- package/lib/processor.dynamicBug/summary-view.d.ts +7 -0
- package/lib/processor.dynamicBug/summary-view.js +33 -0
- package/lib/processor.dynamicBug/summary-view.js.map +1 -0
- package/package.json +3 -3
package/client/info.js
CHANGED
@@ -743,7 +743,7 @@ var require_config = __commonJS({
|
|
743
743
|
return void 0;
|
744
744
|
}
|
745
745
|
exports.contractHardwareAcceleration = contractHardwareAcceleration;
|
746
|
-
function
|
746
|
+
function HardwareSelection7() {
|
747
747
|
return {
|
748
748
|
id: "hardware-acceleration",
|
749
749
|
form: {
|
@@ -761,7 +761,7 @@ var require_config = __commonJS({
|
|
761
761
|
}
|
762
762
|
};
|
763
763
|
}
|
764
|
-
exports.HardwareSelection =
|
764
|
+
exports.HardwareSelection = HardwareSelection7;
|
765
765
|
function RootDataDir() {
|
766
766
|
return {
|
767
767
|
id: "root-data-dir",
|
@@ -1442,6 +1442,94 @@ var init_inline_view8 = __esm({
|
|
1442
1442
|
}
|
1443
1443
|
});
|
1444
1444
|
|
1445
|
+
// build/processor.dynamicBug/bug-selection.js
|
1446
|
+
var bug_selection_exports = {};
|
1447
|
+
__export(bug_selection_exports, {
|
1448
|
+
default: () => bug_selection_default
|
1449
|
+
});
|
1450
|
+
function BugSelection(props) {
|
1451
|
+
const [loading, setLoading] = (0, import_react33.useState)(true);
|
1452
|
+
(0, import_react33.useEffect)(() => {
|
1453
|
+
const fn = async () => {
|
1454
|
+
const result2 = await fetch("components/processor.dynamicBug/bugs");
|
1455
|
+
if (result2.ok && result2.body) {
|
1456
|
+
const bugs2 = await result2.json();
|
1457
|
+
setBugs(bugs2);
|
1458
|
+
setLoading(false);
|
1459
|
+
if (props.defaultValue)
|
1460
|
+
props.onChanged(props.defaultValue);
|
1461
|
+
} else {
|
1462
|
+
const text = await result2.text();
|
1463
|
+
throw new Error(text);
|
1464
|
+
}
|
1465
|
+
};
|
1466
|
+
fn().catch(console.error);
|
1467
|
+
}, []);
|
1468
|
+
const [bugs, setBugs] = (0, import_react33.useState)([]);
|
1469
|
+
if (loading) {
|
1470
|
+
return (0, import_jsx_runtime31.jsx)("div", { children: "Loading.." });
|
1471
|
+
}
|
1472
|
+
if (bugs.length == 0) {
|
1473
|
+
return (0, import_jsx_runtime31.jsx)("div", { children: "No bugs loaded" });
|
1474
|
+
}
|
1475
|
+
return (0, import_jsx_runtime31.jsx)("div", { children: (0, import_jsx_runtime31.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime31.jsx)("option", { value: "", children: "---" }, "empty"), bugs.map((o, i) => {
|
1476
|
+
return (0, import_jsx_runtime31.jsx)("option", { value: o, children: o }, i);
|
1477
|
+
})] }) });
|
1478
|
+
function myOnChange(e) {
|
1479
|
+
props.onChanged(e.target.value);
|
1480
|
+
}
|
1481
|
+
}
|
1482
|
+
var import_jsx_runtime31, import_react33, bug_selection_default;
|
1483
|
+
var init_bug_selection = __esm({
|
1484
|
+
"build/processor.dynamicBug/bug-selection.js"() {
|
1485
|
+
"use strict";
|
1486
|
+
import_jsx_runtime31 = __toESM(require_jsx_runtime());
|
1487
|
+
import_react33 = __toESM(require_react());
|
1488
|
+
bug_selection_default = BugSelection;
|
1489
|
+
}
|
1490
|
+
});
|
1491
|
+
|
1492
|
+
// build/processor.dynamicBug/summary-view.js
|
1493
|
+
var summary_view_exports5 = {};
|
1494
|
+
__export(summary_view_exports5, {
|
1495
|
+
default: () => summary_view_default5
|
1496
|
+
});
|
1497
|
+
function SummaryView7({ state, config, sendCommand }) {
|
1498
|
+
const [bug, setBug] = (0, import_react34.useState)(state.activeBug?.file ?? config.defaultBug);
|
1499
|
+
const [orientation, setOrientation] = (0, import_react34.useState)(state.activeBug?.orientation ?? config.defaultOrientation);
|
1500
|
+
const [bugs, setBugs] = (0, import_react34.useState)([]);
|
1501
|
+
(0, import_react34.useEffect)(() => {
|
1502
|
+
const fn = async () => {
|
1503
|
+
const result2 = await fetch("components/processor.dynamicBug/bugs");
|
1504
|
+
if (result2.ok && result2.body) {
|
1505
|
+
const bugs2 = await result2.json();
|
1506
|
+
setBugs(bugs2);
|
1507
|
+
} else {
|
1508
|
+
const text = await result2.text();
|
1509
|
+
throw new Error(text);
|
1510
|
+
}
|
1511
|
+
};
|
1512
|
+
fn().catch(console.error);
|
1513
|
+
}, []);
|
1514
|
+
return (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [(0, import_jsx_runtime32.jsx)("h2", { children: "Controls" }), (0, import_jsx_runtime32.jsx)("label", { htmlFor: "select-preview", className: "mt-2", children: "Source" }), (0, import_jsx_runtime32.jsxs)("select", { id: "select-bug", className: "mt-2 node-editor-select-input", onChange: (e) => {
|
1515
|
+
setBug(e.currentTarget.value);
|
1516
|
+
}, children: [(0, import_jsx_runtime32.jsx)("option", { selected: bug === void 0, children: "---" }), bugs.map((s, i) => (0, import_jsx_runtime32.jsx)("option", { selected: bug == s, value: s, children: s }, i))] }), (0, import_jsx_runtime32.jsxs)("select", { id: "select-orientation", className: "mt-2 node-editor-select-input", onChange: (e) => {
|
1517
|
+
setOrientation(e.currentTarget.value);
|
1518
|
+
}, children: [(0, import_jsx_runtime32.jsx)("option", { selected: orientation === void 0, children: "---" }), (0, import_jsx_runtime32.jsx)("option", { value: "topleft", selected: orientation === "topleft", children: "Top Left" }), (0, import_jsx_runtime32.jsx)("option", { value: "topright", selected: orientation === "topright", children: "Top Right" }), (0, import_jsx_runtime32.jsx)("option", { value: "bottomleft", selected: orientation === "bottomleft", children: "Bottom Left" }), (0, import_jsx_runtime32.jsx)("option", { value: "bottomright", selected: orientation === "bottomright", children: "Bottom Right" })] }), bug != state.activeBug?.file || orientation != state.activeBug?.orientation ? (0, import_jsx_runtime32.jsx)("button", { type: "button", className: "mt-2 mb-2 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800", onClick: (e) => {
|
1519
|
+
e.preventDefault();
|
1520
|
+
sendCommand({ type: "change-bug", file: bug, orientation });
|
1521
|
+
}, children: "Commit" }) : (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, {})] });
|
1522
|
+
}
|
1523
|
+
var import_jsx_runtime32, import_react34, summary_view_default5;
|
1524
|
+
var init_summary_view5 = __esm({
|
1525
|
+
"build/processor.dynamicBug/summary-view.js"() {
|
1526
|
+
"use strict";
|
1527
|
+
import_jsx_runtime32 = __toESM(require_jsx_runtime());
|
1528
|
+
import_react34 = __toESM(require_react());
|
1529
|
+
summary_view_default5 = SummaryView7;
|
1530
|
+
}
|
1531
|
+
});
|
1532
|
+
|
1445
1533
|
// build/processor.monetise/summary.js
|
1446
1534
|
var summary_exports3 = {};
|
1447
1535
|
__export(summary_exports3, {
|
@@ -1450,9 +1538,9 @@ __export(summary_exports3, {
|
|
1450
1538
|
function InlineView14({ state, config, sendCommand }) {
|
1451
1539
|
const url = state.url;
|
1452
1540
|
const id = config.id;
|
1453
|
-
const previewVideo = (0,
|
1454
|
-
const durationSlider = (0,
|
1455
|
-
(0,
|
1541
|
+
const previewVideo = (0, import_react36.useRef)(null);
|
1542
|
+
const durationSlider = (0, import_react36.useRef)(null);
|
1543
|
+
(0, import_react36.useEffect)(() => {
|
1456
1544
|
if (!url)
|
1457
1545
|
return;
|
1458
1546
|
setTimeout(() => {
|
@@ -1465,8 +1553,8 @@ function InlineView14({ state, config, sendCommand }) {
|
|
1465
1553
|
}, 1e3);
|
1466
1554
|
}, [state.url]);
|
1467
1555
|
if (!url)
|
1468
|
-
return (0,
|
1469
|
-
return (0,
|
1556
|
+
return (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: "Starting up..." });
|
1557
|
+
return (0, import_jsx_runtime33.jsxs)("div", { className: "mb-5", children: [(0, import_jsx_runtime33.jsx)("div", { ref: previewVideo, className: "", id: `preview-${id}` }), state.currentAdvert ? (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: ["Advert currently playing: ", Math.floor(state.currentAdvert.timeLeftMs / 1e3), "s"] }) : (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [(0, import_jsx_runtime33.jsxs)("label", { htmlFor: "default-range", className: "block mb-2 text-sm font-medium text-gray-900 dark:text-white", children: ["Advert Duration (", durationSlider.current?.value ?? 16, "s)"] }), (0, import_jsx_runtime33.jsx)("input", { ref: durationSlider, id: "default-range", type: "range", defaultValue: "16", min: "16", max: "120", className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700" }), (0, import_jsx_runtime33.jsx)("button", { onClick: sendAdvertCommand, type: "button", className: "mt-2 mb-2 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800", children: "Inject Advert" })] })] });
|
1470
1558
|
function sendAdvertCommand() {
|
1471
1559
|
if (!previewVideo.current)
|
1472
1560
|
return;
|
@@ -1478,12 +1566,12 @@ function InlineView14({ state, config, sendCommand }) {
|
|
1478
1566
|
});
|
1479
1567
|
}
|
1480
1568
|
}
|
1481
|
-
var
|
1569
|
+
var import_jsx_runtime33, import_react36, import_webrtc_client2, summary_default3;
|
1482
1570
|
var init_summary3 = __esm({
|
1483
1571
|
"build/processor.monetise/summary.js"() {
|
1484
1572
|
"use strict";
|
1485
|
-
|
1486
|
-
|
1573
|
+
import_jsx_runtime33 = __toESM(require_jsx_runtime());
|
1574
|
+
import_react36 = __toESM(require_react());
|
1487
1575
|
import_webrtc_client2 = __toESM(require_webrtc_client());
|
1488
1576
|
summary_default3 = InlineView14;
|
1489
1577
|
}
|
@@ -15813,8 +15901,8 @@ __export(inline_view_exports9, {
|
|
15813
15901
|
default: () => inline_view_default9
|
15814
15902
|
});
|
15815
15903
|
function InlineView15({ state, config: _2 }) {
|
15816
|
-
const chartContainer = (0,
|
15817
|
-
const [chartControl, setChartControl] = (0,
|
15904
|
+
const chartContainer = (0, import_react38.useRef)(null);
|
15905
|
+
const [chartControl, setChartControl] = (0, import_react38.useState)(void 0);
|
15818
15906
|
function makeDataSet(key, color2, values) {
|
15819
15907
|
return {
|
15820
15908
|
label: key,
|
@@ -15831,7 +15919,7 @@ function InlineView15({ state, config: _2 }) {
|
|
15831
15919
|
datasets: [makeDataSet("latency", "rgba(255, 0, 0, 255)", state2.values)]
|
15832
15920
|
};
|
15833
15921
|
}
|
15834
|
-
(0,
|
15922
|
+
(0, import_react38.useEffect)(() => {
|
15835
15923
|
if (!chartContainer.current)
|
15836
15924
|
return;
|
15837
15925
|
auto_default.defaults.color = "#FFF";
|
@@ -15869,19 +15957,19 @@ function InlineView15({ state, config: _2 }) {
|
|
15869
15957
|
chart.update();
|
15870
15958
|
}, 100);
|
15871
15959
|
}, [chartContainer]);
|
15872
|
-
(0,
|
15960
|
+
(0, import_react38.useEffect)(() => {
|
15873
15961
|
if (!chartControl)
|
15874
15962
|
return;
|
15875
15963
|
chartControl.data = makeData(state);
|
15876
15964
|
}, [state]);
|
15877
|
-
return (0,
|
15965
|
+
return (0, import_jsx_runtime34.jsx)("div", { className: "bg-gray-50 dark:bg-gray-700 rounded", style: { width: "360px", height: "200px", padding: "10px" }, children: (0, import_jsx_runtime34.jsx)("canvas", { className: "bg-gray-50 dark:bg-gray-700 rounded", ref: chartContainer }) });
|
15878
15966
|
}
|
15879
|
-
var
|
15967
|
+
var import_jsx_runtime34, import_react38, inline_view_default9;
|
15880
15968
|
var init_inline_view9 = __esm({
|
15881
15969
|
"build/util.latency/inline-view.js"() {
|
15882
15970
|
"use strict";
|
15883
|
-
|
15884
|
-
|
15971
|
+
import_jsx_runtime34 = __toESM(require_jsx_runtime());
|
15972
|
+
import_react38 = __toESM(require_react());
|
15885
15973
|
init_auto();
|
15886
15974
|
inline_view_default9 = InlineView15;
|
15887
15975
|
}
|
@@ -15893,22 +15981,22 @@ __export(source_node_selection_exports, {
|
|
15893
15981
|
default: () => source_node_selection_default
|
15894
15982
|
});
|
15895
15983
|
function SourceNodeSelection(props) {
|
15896
|
-
return (0,
|
15984
|
+
return (0, import_jsx_runtime35.jsx)("div", { children: (0, import_jsx_runtime35.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime35.jsx)("option", { value: "", children: "---" }, "empty"), Object.values(props.latestDocument.nodes).map((o, i) => {
|
15897
15985
|
if (o.id == props.id)
|
15898
|
-
return (0,
|
15986
|
+
return (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, {});
|
15899
15987
|
if (o.info.category === "output")
|
15900
15988
|
return;
|
15901
|
-
return (0,
|
15989
|
+
return (0, import_jsx_runtime35.jsx)("option", { value: o.id, children: o.config.displayName }, i);
|
15902
15990
|
})] }) });
|
15903
15991
|
function myOnChange(e) {
|
15904
15992
|
props.onChanged(e.target.value);
|
15905
15993
|
}
|
15906
15994
|
}
|
15907
|
-
var
|
15995
|
+
var import_jsx_runtime35, source_node_selection_default;
|
15908
15996
|
var init_source_node_selection = __esm({
|
15909
15997
|
"build/util.latency/source-node-selection.js"() {
|
15910
15998
|
"use strict";
|
15911
|
-
|
15999
|
+
import_jsx_runtime35 = __toESM(require_jsx_runtime());
|
15912
16000
|
source_node_selection_default = SourceNodeSelection;
|
15913
16001
|
}
|
15914
16002
|
});
|
@@ -15919,8 +16007,8 @@ __export(inline_view_exports10, {
|
|
15919
16007
|
default: () => inline_view_default10
|
15920
16008
|
});
|
15921
16009
|
function InlineView16({ state, config: _2 }) {
|
15922
|
-
const chartContainer = (0,
|
15923
|
-
const [chartControl, setChartControl] = (0,
|
16010
|
+
const chartContainer = (0, import_react40.useRef)(null);
|
16011
|
+
const [chartControl, setChartControl] = (0, import_react40.useState)(void 0);
|
15924
16012
|
function makeDataSet(key, color2, values) {
|
15925
16013
|
return {
|
15926
16014
|
label: key,
|
@@ -15941,7 +16029,7 @@ function InlineView16({ state, config: _2 }) {
|
|
15941
16029
|
]
|
15942
16030
|
};
|
15943
16031
|
}
|
15944
|
-
(0,
|
16032
|
+
(0, import_react40.useEffect)(() => {
|
15945
16033
|
if (!chartContainer.current)
|
15946
16034
|
return;
|
15947
16035
|
auto_default.defaults.color = "#FFF";
|
@@ -15979,19 +16067,19 @@ function InlineView16({ state, config: _2 }) {
|
|
15979
16067
|
chart.update();
|
15980
16068
|
}, 100);
|
15981
16069
|
}, [chartContainer]);
|
15982
|
-
(0,
|
16070
|
+
(0, import_react40.useEffect)(() => {
|
15983
16071
|
if (!chartControl)
|
15984
16072
|
return;
|
15985
16073
|
chartControl.data = makeData(state);
|
15986
16074
|
}, [state]);
|
15987
|
-
return (0,
|
16075
|
+
return (0, import_jsx_runtime36.jsx)("div", { className: "bg-gray-50 dark:bg-gray-700 rounded", style: { width: "360px", height: "200px", padding: "10px" }, children: (0, import_jsx_runtime36.jsx)("canvas", { className: "bg-gray-50 dark:bg-gray-700 rounded", ref: chartContainer }) });
|
15988
16076
|
}
|
15989
|
-
var
|
16077
|
+
var import_jsx_runtime36, import_react40, inline_view_default10;
|
15990
16078
|
var init_inline_view10 = __esm({
|
15991
16079
|
"build/util.ma35d/inline-view.js"() {
|
15992
16080
|
"use strict";
|
15993
|
-
|
15994
|
-
|
16081
|
+
import_jsx_runtime36 = __toESM(require_jsx_runtime());
|
16082
|
+
import_react40 = __toESM(require_react());
|
15995
16083
|
init_auto();
|
15996
16084
|
inline_view_default10 = InlineView16;
|
15997
16085
|
}
|
@@ -16003,9 +16091,9 @@ __export(inline_view_exports11, {
|
|
16003
16091
|
default: () => inline_view_default11
|
16004
16092
|
});
|
16005
16093
|
function InlineView17({ state, config: _2 }) {
|
16006
|
-
const chartContainer = (0,
|
16007
|
-
const [chartControl, setChartControl] = (0,
|
16008
|
-
(0,
|
16094
|
+
const chartContainer = (0, import_react42.useRef)(null);
|
16095
|
+
const [chartControl, setChartControl] = (0, import_react42.useState)(void 0);
|
16096
|
+
(0, import_react42.useEffect)(() => {
|
16009
16097
|
if (!chartContainer.current)
|
16010
16098
|
return;
|
16011
16099
|
if (state.timestamps.length < 2)
|
@@ -16067,7 +16155,7 @@ function InlineView17({ state, config: _2 }) {
|
|
16067
16155
|
chart.update();
|
16068
16156
|
}, 100);
|
16069
16157
|
}, [chartContainer]);
|
16070
|
-
(0,
|
16158
|
+
(0, import_react42.useEffect)(() => {
|
16071
16159
|
if (!chartControl)
|
16072
16160
|
return;
|
16073
16161
|
chartControl.data = {
|
@@ -16090,14 +16178,14 @@ function InlineView17({ state, config: _2 }) {
|
|
16090
16178
|
})
|
16091
16179
|
};
|
16092
16180
|
}, [state]);
|
16093
|
-
return (0,
|
16181
|
+
return (0, import_jsx_runtime37.jsx)("div", { className: "bg-gray-50 dark:bg-gray-700 rounded", style: { width: "360px", height: "200px", padding: "10px" }, children: (0, import_jsx_runtime37.jsx)("canvas", { className: "bg-gray-50 dark:bg-gray-700 rounded", ref: chartContainer }) });
|
16094
16182
|
}
|
16095
|
-
var
|
16183
|
+
var import_jsx_runtime37, import_react42, inline_view_default11;
|
16096
16184
|
var init_inline_view11 = __esm({
|
16097
16185
|
"build/util.timestamps/inline-view.js"() {
|
16098
16186
|
"use strict";
|
16099
|
-
|
16100
|
-
|
16187
|
+
import_jsx_runtime37 = __toESM(require_jsx_runtime());
|
16188
|
+
import_react42 = __toESM(require_react());
|
16101
16189
|
init_auto();
|
16102
16190
|
inline_view_default11 = InlineView17;
|
16103
16191
|
}
|
@@ -16525,7 +16613,7 @@ function info_default7({ defineComponent, Video, validation: { SourceName }, com
|
|
16525
16613
|
// build/output.autoCmaf/info.js
|
16526
16614
|
var import_react10 = __toESM(require_react());
|
16527
16615
|
function info_default8({ defineComponent, All, validation: { Z, Hostname } }) {
|
16528
|
-
const
|
16616
|
+
const SummaryView8 = import_react10.default.lazy(async () => Promise.resolve().then(() => (init_summary(), summary_exports)));
|
16529
16617
|
const FullscreenView3 = import_react10.default.lazy(async () => Promise.resolve().then(() => (init_fullscreen(), fullscreen_exports)));
|
16530
16618
|
const SegmentConfiguration2 = import_react10.default.lazy(async () => {
|
16531
16619
|
const views = await Promise.resolve().then(() => (init_form_views(), form_views_exports));
|
@@ -16572,7 +16660,7 @@ function info_default8({ defineComponent, All, validation: { Z, Hostname } }) {
|
|
16572
16660
|
}
|
16573
16661
|
return { ...state };
|
16574
16662
|
},
|
16575
|
-
summary:
|
16663
|
+
summary: SummaryView8,
|
16576
16664
|
fullscreen: FullscreenView3
|
16577
16665
|
},
|
16578
16666
|
configForm: {
|
@@ -17065,8 +17153,8 @@ function info_default15(R) {
|
|
17065
17153
|
// build/processor.actionReplay/info.js
|
17066
17154
|
var import_react24 = __toESM(require_react());
|
17067
17155
|
var import_config3 = __toESM(require_config());
|
17068
|
-
function info_default16({ defineComponent, assertUnreachable:
|
17069
|
-
const
|
17156
|
+
function info_default16({ defineComponent, assertUnreachable: assertUnreachable16, Av }) {
|
17157
|
+
const SummaryView8 = import_react24.default.lazy(async () => Promise.resolve().then(() => (init_summary2(), summary_exports2)));
|
17070
17158
|
return defineComponent({
|
17071
17159
|
identifier: "processor.transform.actionReplay",
|
17072
17160
|
category: "processor",
|
@@ -17097,7 +17185,7 @@ function info_default16({ defineComponent, assertUnreachable: assertUnreachable1
|
|
17097
17185
|
}
|
17098
17186
|
},
|
17099
17187
|
runtime: {
|
17100
|
-
summary:
|
17188
|
+
summary: SummaryView8,
|
17101
17189
|
initialState: () => ({
|
17102
17190
|
replaying: false,
|
17103
17191
|
contentPlayerUrl: void 0
|
@@ -17112,7 +17200,7 @@ function info_default16({ defineComponent, assertUnreachable: assertUnreachable1
|
|
17112
17200
|
case "replay-finished":
|
17113
17201
|
return { ...state, replaying: false };
|
17114
17202
|
default:
|
17115
|
-
return
|
17203
|
+
return assertUnreachable16(evType);
|
17116
17204
|
}
|
17117
17205
|
}
|
17118
17206
|
},
|
@@ -17133,7 +17221,7 @@ function info_default16({ defineComponent, assertUnreachable: assertUnreachable1
|
|
17133
17221
|
var import_react26 = __toESM(require_react());
|
17134
17222
|
function info_default17({ defineComponent, Audio, validation: { Z } }) {
|
17135
17223
|
const InlineView18 = import_react26.default.lazy(async () => Promise.resolve().then(() => (init_inline_view6(), inline_view_exports6)));
|
17136
|
-
const
|
17224
|
+
const SummaryView8 = import_react26.default.lazy(async () => Promise.resolve().then(() => (init_summary_view3(), summary_view_exports3)));
|
17137
17225
|
return defineComponent({
|
17138
17226
|
identifier: "processor.audioLevel",
|
17139
17227
|
category: "processor",
|
@@ -17174,7 +17262,7 @@ function info_default17({ defineComponent, Audio, validation: { Z } }) {
|
|
17174
17262
|
return { ...state };
|
17175
17263
|
},
|
17176
17264
|
inline: InlineView18,
|
17177
|
-
summary:
|
17265
|
+
summary: SummaryView8
|
17178
17266
|
},
|
17179
17267
|
configForm: {
|
17180
17268
|
form: {
|
@@ -17195,7 +17283,7 @@ function mkSourceKey3(sourceId, key) {
|
|
17195
17283
|
function info_default18({ defineComponent, Audio, validation: { Z } }) {
|
17196
17284
|
const InlineView18 = import_react28.default.lazy(async () => Promise.resolve().then(() => (init_inline_view7(), inline_view_exports7)));
|
17197
17285
|
const FullscreenView3 = import_react28.default.lazy(async () => Promise.resolve().then(() => (init_fullscreen_view(), fullscreen_view_exports)));
|
17198
|
-
const
|
17286
|
+
const SummaryView8 = import_react28.default.lazy(async () => Promise.resolve().then(() => (init_summary_view4(), summary_view_exports4)));
|
17199
17287
|
return defineComponent({
|
17200
17288
|
identifier: "processor.audioMixer",
|
17201
17289
|
category: "processor",
|
@@ -17280,7 +17368,7 @@ function info_default18({ defineComponent, Audio, validation: { Z } }) {
|
|
17280
17368
|
},
|
17281
17369
|
inline: InlineView18,
|
17282
17370
|
fullscreen: FullscreenView3,
|
17283
|
-
summary:
|
17371
|
+
summary: SummaryView8
|
17284
17372
|
},
|
17285
17373
|
configForm: {
|
17286
17374
|
form: {
|
@@ -17411,9 +17499,9 @@ function info_default20({ defineComponent, Video, validation: { Z } }) {
|
|
17411
17499
|
}
|
17412
17500
|
|
17413
17501
|
// build/processor.cascadingSwitch/info.js
|
17414
|
-
function info_default21({ defineComponent, Av, React:
|
17415
|
-
const SourceSelection =
|
17416
|
-
const InlineView18 =
|
17502
|
+
function info_default21({ defineComponent, Av, React: React20, common: { Resolutions, FrameRates } }) {
|
17503
|
+
const SourceSelection = React20.lazy(async () => Promise.resolve().then(() => (init_source_selection(), source_selection_exports)));
|
17504
|
+
const InlineView18 = React20.lazy(async () => Promise.resolve().then(() => (init_inline_view8(), inline_view_exports8)));
|
17417
17505
|
return defineComponent({
|
17418
17506
|
identifier: "processor.control.cascadingSwitch",
|
17419
17507
|
category: "processor",
|
@@ -17546,9 +17634,84 @@ function assertUnreachable10(_) {
|
|
17546
17634
|
throw new Error("Didn't expect to get here");
|
17547
17635
|
}
|
17548
17636
|
|
17549
|
-
// build/processor.
|
17637
|
+
// build/processor.dynamicBug/info.js
|
17550
17638
|
var import_config5 = __toESM(require_config());
|
17639
|
+
var import_react35 = __toESM(require_react());
|
17551
17640
|
function info_default22({ defineComponent, Video }) {
|
17641
|
+
const BugSelection2 = import_react35.default.lazy(async () => Promise.resolve().then(() => (init_bug_selection(), bug_selection_exports)));
|
17642
|
+
const SummaryView8 = import_react35.default.lazy(async () => Promise.resolve().then(() => (init_summary_view5(), summary_view_exports5)));
|
17643
|
+
return defineComponent({
|
17644
|
+
identifier: "processor.dynamicBug",
|
17645
|
+
category: "processor",
|
17646
|
+
name: "Dynamic Bug",
|
17647
|
+
subscription: {
|
17648
|
+
// Only accept a single video stream
|
17649
|
+
accepts: {
|
17650
|
+
type: "single-stream",
|
17651
|
+
media: Video
|
17652
|
+
},
|
17653
|
+
produces: {
|
17654
|
+
type: "single-stream",
|
17655
|
+
media: Video
|
17656
|
+
}
|
17657
|
+
},
|
17658
|
+
extraValidation: function(ctx) {
|
17659
|
+
ctx.requireVideo(1);
|
17660
|
+
},
|
17661
|
+
display: (desc) => {
|
17662
|
+
return {
|
17663
|
+
default: desc.config.defaultBug ?? "none"
|
17664
|
+
};
|
17665
|
+
},
|
17666
|
+
runtime: {
|
17667
|
+
summary: SummaryView8,
|
17668
|
+
initialState: () => ({}),
|
17669
|
+
handleEvent: (ev, state) => {
|
17670
|
+
const evType = ev.type;
|
17671
|
+
switch (evType) {
|
17672
|
+
case "bug-changed":
|
17673
|
+
return { ...state, activeBug: { file: ev.file, orientation: ev.orientation } };
|
17674
|
+
default:
|
17675
|
+
assertUnreachable11(evType);
|
17676
|
+
}
|
17677
|
+
}
|
17678
|
+
},
|
17679
|
+
configForm: {
|
17680
|
+
global: {
|
17681
|
+
hardware: (0, import_config5.HardwareSelection)()
|
17682
|
+
},
|
17683
|
+
form: {
|
17684
|
+
defaultBug: {
|
17685
|
+
help: "The default bug to render on the video (if any)",
|
17686
|
+
hint: {
|
17687
|
+
type: "custom",
|
17688
|
+
component: BugSelection2
|
17689
|
+
}
|
17690
|
+
},
|
17691
|
+
defaultOrientation: {
|
17692
|
+
help: "The default location to render the bug in",
|
17693
|
+
hint: {
|
17694
|
+
type: "select",
|
17695
|
+
optional: true,
|
17696
|
+
options: [
|
17697
|
+
{ value: "topleft", display: "Top Left" },
|
17698
|
+
{ value: "topright", display: "Top Right" },
|
17699
|
+
{ value: "bottomleft", display: "Bottom Left" },
|
17700
|
+
{ value: "bottomright", display: "Bottom Right" }
|
17701
|
+
]
|
17702
|
+
}
|
17703
|
+
}
|
17704
|
+
}
|
17705
|
+
}
|
17706
|
+
});
|
17707
|
+
}
|
17708
|
+
function assertUnreachable11(_) {
|
17709
|
+
throw new Error("Didn't expect to get here");
|
17710
|
+
}
|
17711
|
+
|
17712
|
+
// build/processor.fixedLadder/info.js
|
17713
|
+
var import_config6 = __toESM(require_config());
|
17714
|
+
function info_default23({ defineComponent, Video }) {
|
17552
17715
|
return defineComponent({
|
17553
17716
|
identifier: "processor.transform.fixedLadder",
|
17554
17717
|
category: "processor",
|
@@ -17588,7 +17751,7 @@ function info_default22({ defineComponent, Video }) {
|
|
17588
17751
|
},
|
17589
17752
|
configForm: {
|
17590
17753
|
global: {
|
17591
|
-
hardware: (0,
|
17754
|
+
hardware: (0, import_config6.HardwareSelection)()
|
17592
17755
|
},
|
17593
17756
|
form: {
|
17594
17757
|
rungs: {
|
@@ -17617,11 +17780,11 @@ var rungNames = [
|
|
17617
17780
|
];
|
17618
17781
|
|
17619
17782
|
// build/processor.monetise/info.js
|
17620
|
-
var
|
17621
|
-
var
|
17622
|
-
function
|
17783
|
+
var import_react37 = __toESM(require_react());
|
17784
|
+
var import_config7 = __toESM(require_config());
|
17785
|
+
function info_default24(R) {
|
17623
17786
|
const { defineComponent, Av } = R;
|
17624
|
-
const
|
17787
|
+
const SummaryView8 = import_react37.default.lazy(async () => Promise.resolve().then(() => (init_summary3(), summary_exports3)));
|
17625
17788
|
return defineComponent({
|
17626
17789
|
identifier: "processor.monetise",
|
17627
17790
|
category: "output",
|
@@ -17661,27 +17824,27 @@ function info_default23(R) {
|
|
17661
17824
|
state.currentAdvert = void 0;
|
17662
17825
|
break;
|
17663
17826
|
default:
|
17664
|
-
|
17827
|
+
assertUnreachable12(evType);
|
17665
17828
|
}
|
17666
17829
|
return { ...state };
|
17667
17830
|
},
|
17668
|
-
summary:
|
17831
|
+
summary: SummaryView8
|
17669
17832
|
},
|
17670
17833
|
configForm: {
|
17671
17834
|
global: {
|
17672
|
-
iceServers: (0,
|
17673
|
-
hardware: (0,
|
17835
|
+
iceServers: (0, import_config7.GlobalIceServers)(R),
|
17836
|
+
hardware: (0, import_config7.HardwareSelection)()
|
17674
17837
|
},
|
17675
17838
|
form: {}
|
17676
17839
|
}
|
17677
17840
|
});
|
17678
17841
|
}
|
17679
|
-
function
|
17842
|
+
function assertUnreachable12(_) {
|
17680
17843
|
throw new Error("Didn't expect to get here");
|
17681
17844
|
}
|
17682
17845
|
|
17683
17846
|
// build/processor.whisper-transcribe/info.js
|
17684
|
-
function
|
17847
|
+
function info_default25({ defineComponent, Av, Subtitle, validation: { Z } }) {
|
17685
17848
|
return defineComponent({
|
17686
17849
|
identifier: "processor.whisper-transcribe",
|
17687
17850
|
category: "processor",
|
@@ -17723,11 +17886,11 @@ function info_default24({ defineComponent, Av, Subtitle, validation: { Z } }) {
|
|
17723
17886
|
}
|
17724
17887
|
|
17725
17888
|
// build/util.latency/info.js
|
17726
|
-
var
|
17727
|
-
function
|
17889
|
+
var import_react39 = __toESM(require_react());
|
17890
|
+
function info_default26(R) {
|
17728
17891
|
const { defineComponent } = R;
|
17729
|
-
const InlineView18 =
|
17730
|
-
const SourceNodeSelection2 =
|
17892
|
+
const InlineView18 = import_react39.default.lazy(async () => Promise.resolve().then(() => (init_inline_view9(), inline_view_exports9)));
|
17893
|
+
const SourceNodeSelection2 = import_react39.default.lazy(async () => Promise.resolve().then(() => (init_source_node_selection(), source_node_selection_exports)));
|
17731
17894
|
return defineComponent({
|
17732
17895
|
identifier: "util.latency-stats",
|
17733
17896
|
category: "output",
|
@@ -17754,7 +17917,7 @@ function info_default25(R) {
|
|
17754
17917
|
break;
|
17755
17918
|
}
|
17756
17919
|
default:
|
17757
|
-
|
17920
|
+
assertUnreachable13(evType);
|
17758
17921
|
}
|
17759
17922
|
return { ...state };
|
17760
17923
|
},
|
@@ -17808,15 +17971,15 @@ function info_default25(R) {
|
|
17808
17971
|
}
|
17809
17972
|
});
|
17810
17973
|
}
|
17811
|
-
function
|
17974
|
+
function assertUnreachable13(_) {
|
17812
17975
|
throw new Error("Didn't expect to get here");
|
17813
17976
|
}
|
17814
17977
|
|
17815
17978
|
// build/util.ma35d/info.js
|
17816
|
-
var
|
17817
|
-
function
|
17979
|
+
var import_react41 = __toESM(require_react());
|
17980
|
+
function info_default27(R) {
|
17818
17981
|
const { defineComponent } = R;
|
17819
|
-
const InlineView18 =
|
17982
|
+
const InlineView18 = import_react41.default.lazy(async () => Promise.resolve().then(() => (init_inline_view10(), inline_view_exports10)));
|
17820
17983
|
return defineComponent({
|
17821
17984
|
identifier: "util.ma35d-stats",
|
17822
17985
|
category: "output",
|
@@ -17849,7 +18012,7 @@ function info_default26(R) {
|
|
17849
18012
|
break;
|
17850
18013
|
}
|
17851
18014
|
default:
|
17852
|
-
|
18015
|
+
assertUnreachable14(evType);
|
17853
18016
|
}
|
17854
18017
|
return { ...state };
|
17855
18018
|
},
|
@@ -17860,15 +18023,15 @@ function info_default26(R) {
|
|
17860
18023
|
}
|
17861
18024
|
});
|
17862
18025
|
}
|
17863
|
-
function
|
18026
|
+
function assertUnreachable14(_) {
|
17864
18027
|
throw new Error("Didn't expect to get here");
|
17865
18028
|
}
|
17866
18029
|
|
17867
18030
|
// build/util.timestamps/info.js
|
17868
|
-
var
|
17869
|
-
function
|
18031
|
+
var import_react43 = __toESM(require_react());
|
18032
|
+
function info_default28(R) {
|
17870
18033
|
const { defineComponent, All } = R;
|
17871
|
-
const InlineView18 =
|
18034
|
+
const InlineView18 = import_react43.default.lazy(async () => Promise.resolve().then(() => (init_inline_view11(), inline_view_exports11)));
|
17872
18035
|
return defineComponent({
|
17873
18036
|
identifier: "util.timestamps",
|
17874
18037
|
category: "output",
|
@@ -17903,7 +18066,7 @@ function info_default27(R) {
|
|
17903
18066
|
break;
|
17904
18067
|
}
|
17905
18068
|
default:
|
17906
|
-
|
18069
|
+
assertUnreachable15(evType);
|
17907
18070
|
}
|
17908
18071
|
return { ...state };
|
17909
18072
|
},
|
@@ -17914,7 +18077,7 @@ function info_default27(R) {
|
|
17914
18077
|
}
|
17915
18078
|
});
|
17916
18079
|
}
|
17917
|
-
function
|
18080
|
+
function assertUnreachable15(_) {
|
17918
18081
|
throw new Error("Didn't expect to get here");
|
17919
18082
|
}
|
17920
18083
|
|
@@ -17959,6 +18122,7 @@ AllComponents.push((r) => info_default24(r));
|
|
17959
18122
|
AllComponents.push((r) => info_default25(r));
|
17960
18123
|
AllComponents.push((r) => info_default26(r));
|
17961
18124
|
AllComponents.push((r) => info_default27(r));
|
18125
|
+
AllComponents.push((r) => info_default28(r));
|
17962
18126
|
export {
|
17963
18127
|
getNodeInfo as default
|
17964
18128
|
};
|
package/lib/info.js
CHANGED
@@ -59,16 +59,18 @@ const info_20 = __importDefault(require("./processor.browserOverlay/info"));
|
|
59
59
|
AllComponents.push((r) => (0, info_20.default)(r));
|
60
60
|
const info_21 = __importDefault(require("./processor.cascadingSwitch/info"));
|
61
61
|
AllComponents.push((r) => (0, info_21.default)(r));
|
62
|
-
const info_22 = __importDefault(require("./processor.
|
62
|
+
const info_22 = __importDefault(require("./processor.dynamicBug/info"));
|
63
63
|
AllComponents.push((r) => (0, info_22.default)(r));
|
64
|
-
const info_23 = __importDefault(require("./processor.
|
64
|
+
const info_23 = __importDefault(require("./processor.fixedLadder/info"));
|
65
65
|
AllComponents.push((r) => (0, info_23.default)(r));
|
66
|
-
const info_24 = __importDefault(require("./processor.
|
66
|
+
const info_24 = __importDefault(require("./processor.monetise/info"));
|
67
67
|
AllComponents.push((r) => (0, info_24.default)(r));
|
68
|
-
const info_25 = __importDefault(require("./
|
68
|
+
const info_25 = __importDefault(require("./processor.whisper-transcribe/info"));
|
69
69
|
AllComponents.push((r) => (0, info_25.default)(r));
|
70
|
-
const info_26 = __importDefault(require("./util.
|
70
|
+
const info_26 = __importDefault(require("./util.latency/info"));
|
71
71
|
AllComponents.push((r) => (0, info_26.default)(r));
|
72
|
-
const info_27 = __importDefault(require("./util.
|
72
|
+
const info_27 = __importDefault(require("./util.ma35d/info"));
|
73
73
|
AllComponents.push((r) => (0, info_27.default)(r));
|
74
|
+
const info_28 = __importDefault(require("./util.timestamps/info"));
|
75
|
+
AllComponents.push((r) => (0, info_28.default)(r));
|
74
76
|
//# sourceMappingURL=info.js.map
|
package/lib/info.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../src/info.ts"],"names":[],"mappings":";;;;;AAGA,MAAM,qBAAqB,GAA4C,EAAE,CAAC;AAC1E,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,MAAM,aAAa,GAAkD,EAAE,CAAC;AAExE,SAAwB,WAAW,CAAC,CAAe,EAAE,IAAY;IAC/D,IAAG,CAAC,WAAW,EAAE,CAAC;QAChB,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC1B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,qBAAqB,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAA;QACF,WAAW,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AATD,8BASC;AAED,qEAA2D;AAC3D,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAkB,EAAC,CAAC,CAAoC,CAAC,CAAC;AAClG,6DAA2C;AAC3C,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAU,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC1F,gEAAiD;AACjD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,E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,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAqB,EAAC,CAAC,CAAoC,CAAC,CAAC;AACrG,sEAA2D;AAC3D,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAkB,EAAC,CAAC,CAAoC,CAAC,CAAC;AAClG,gFAA+E;AAC/E,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAA4B,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC5G,gEAA+C;AAC/C,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAY,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC5F,8DAA2C;AAC3C,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAU,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC1F,mEAAqD;AACrD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAe,EAAC,CAAC,CAAoC,CAAC,CAAC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { DynamicBugConfig } from "./runtime";
|
2
|
+
type BugSelectionProps = {
|
3
|
+
defaultValue?: string;
|
4
|
+
id: string;
|
5
|
+
onChanged: (value: string) => void;
|
6
|
+
latest: Partial<DynamicBugConfig>;
|
7
|
+
};
|
8
|
+
declare function BugSelection(props: BugSelectionProps): import("react/jsx-runtime").JSX.Element;
|
9
|
+
export default BugSelection;
|
@@ -0,0 +1,39 @@
|
|
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
|
+
function BugSelection(props) {
|
6
|
+
const [loading, setLoading] = (0, react_1.useState)(true);
|
7
|
+
(0, react_1.useEffect)(() => {
|
8
|
+
const fn = async () => {
|
9
|
+
const result = await fetch('components/processor.dynamicBug/bugs');
|
10
|
+
if (result.ok && result.body) {
|
11
|
+
const bugs = await result.json();
|
12
|
+
setBugs(bugs);
|
13
|
+
setLoading(false);
|
14
|
+
if (props.defaultValue)
|
15
|
+
props.onChanged(props.defaultValue);
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
const text = await result.text();
|
19
|
+
throw new Error(text);
|
20
|
+
}
|
21
|
+
};
|
22
|
+
fn().catch(console.error);
|
23
|
+
}, []);
|
24
|
+
const [bugs, setBugs] = (0, react_1.useState)([]);
|
25
|
+
if (loading) {
|
26
|
+
return (0, jsx_runtime_1.jsx)("div", { children: "Loading.." });
|
27
|
+
}
|
28
|
+
if (bugs.length == 0) {
|
29
|
+
return (0, jsx_runtime_1.jsx)("div", { children: "No bugs loaded" });
|
30
|
+
}
|
31
|
+
return (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, jsx_runtime_1.jsx)("option", { value: '', children: "---" }, "empty"), bugs.map((o, i) => {
|
32
|
+
return (0, jsx_runtime_1.jsx)("option", { value: o, children: o }, i);
|
33
|
+
})] }) });
|
34
|
+
function myOnChange(e) {
|
35
|
+
props.onChanged(e.target.value);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
exports.default = BugSelection;
|
39
|
+
//# sourceMappingURL=bug-selection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bug-selection.js","sourceRoot":"","sources":["../../src/processor.dynamicBug/bug-selection.tsx"],"names":[],"mappings":";;;AAAA,iCAAyD;AAUzD,SAAS,YAAY,CAAC,KAAwB;IAC5C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAE7C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAG,KAAK,IAAI,EAA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B,CAAA;gBAC/C,CAAC,CAAC,IACK,GACL,CAAA;IAGN,SAAS,UAAU,CAAC,CAAiC;QACnD,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED,kBAAe,YAAY,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
|
2
|
+
import type { DynamicBugCommand, DynamicBugConfig, DynamicBugEvent, DynamicBugState } from "./runtime";
|
3
|
+
export default function ({ defineComponent, Video }: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<DynamicBugConfig, DynamicBugState, DynamicBugCommand, DynamicBugEvent>;
|
@@ -0,0 +1,102 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
const config_1 = require("@norskvideo/norsk-studio/lib/shared/config");
|
30
|
+
const react_1 = __importDefault(require("react"));
|
31
|
+
function default_1({ defineComponent, Video }) {
|
32
|
+
const BugSelection = react_1.default.lazy(async () => Promise.resolve().then(() => __importStar(require('./bug-selection'))));
|
33
|
+
const SummaryView = react_1.default.lazy(async () => Promise.resolve().then(() => __importStar(require('./summary-view'))));
|
34
|
+
return defineComponent({
|
35
|
+
identifier: 'processor.dynamicBug',
|
36
|
+
category: 'processor',
|
37
|
+
name: "Dynamic Bug",
|
38
|
+
subscription: {
|
39
|
+
accepts: {
|
40
|
+
type: 'single-stream',
|
41
|
+
media: Video
|
42
|
+
},
|
43
|
+
produces: {
|
44
|
+
type: "single-stream",
|
45
|
+
media: Video
|
46
|
+
}
|
47
|
+
},
|
48
|
+
extraValidation: function (ctx) {
|
49
|
+
ctx.requireVideo(1);
|
50
|
+
},
|
51
|
+
display: (desc) => {
|
52
|
+
return {
|
53
|
+
default: desc.config.defaultBug ?? 'none',
|
54
|
+
};
|
55
|
+
},
|
56
|
+
runtime: {
|
57
|
+
summary: SummaryView,
|
58
|
+
initialState: () => ({}),
|
59
|
+
handleEvent: (ev, state) => {
|
60
|
+
const evType = ev.type;
|
61
|
+
switch (evType) {
|
62
|
+
case "bug-changed":
|
63
|
+
return { ...state, activeBug: { file: ev.file, orientation: ev.orientation } };
|
64
|
+
default:
|
65
|
+
assertUnreachable(evType);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
},
|
69
|
+
configForm: {
|
70
|
+
global: {
|
71
|
+
hardware: (0, config_1.HardwareSelection)()
|
72
|
+
},
|
73
|
+
form: {
|
74
|
+
defaultBug: {
|
75
|
+
help: "The default bug to render on the video (if any)",
|
76
|
+
hint: {
|
77
|
+
type: "custom",
|
78
|
+
component: BugSelection,
|
79
|
+
}
|
80
|
+
},
|
81
|
+
defaultOrientation: {
|
82
|
+
help: "The default location to render the bug in",
|
83
|
+
hint: {
|
84
|
+
type: 'select',
|
85
|
+
optional: true,
|
86
|
+
options: [
|
87
|
+
{ value: 'topleft', display: 'Top Left' },
|
88
|
+
{ value: 'topright', display: 'Top Right' },
|
89
|
+
{ value: 'bottomleft', display: 'Bottom Left' },
|
90
|
+
{ value: 'bottomright', display: 'Bottom Right' }
|
91
|
+
]
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
});
|
97
|
+
}
|
98
|
+
exports.default = default_1;
|
99
|
+
function assertUnreachable(_) {
|
100
|
+
throw new Error("Didn't expect to get here");
|
101
|
+
}
|
102
|
+
//# sourceMappingURL=info.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/processor.dynamicBug/info.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uEAA+E;AAC/E,kDAA0B;AAG1B,mBAAwB,EACtB,eAAe,EACf,KAAK,EACQ;IACb,MAAM,YAAY,GAAG,eAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,mDAAQ,iBAAiB,GAAC,CAAC,CAAC;IACvE,MAAM,WAAW,GAAG,eAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,mDAAQ,gBAAgB,GAAC,CAAC,CAAC;IAErE,OAAO,eAAe,CAAwE;QAC5F,UAAU,EAAE,sBAAsB;QAClC,QAAQ,EAAE,WAAW;QACrB,IAAI,EAAE,aAAa;QACnB,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;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E,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE;yBAClD;qBACF;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAzED,4BAyEC;AAED,SAAS,iBAAiB,CAAC,CAAQ;IACjC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import { ComposePart, FileImageInputNode, Norsk, SubscribeDestination, SubscriptionError, VideoComposeNode } from '@norskvideo/norsk-sdk';
|
2
|
+
import { CreatedMediaNode, OnCreated, RelatedMediaNodes, RuntimeUpdates, ServerComponentDefinition, StudioNodeSubscriptionSource, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
3
|
+
import { HardwareAccelerationType } from '@norskvideo/norsk-studio/lib/shared/config';
|
4
|
+
import { Router } from 'express';
|
5
|
+
export type DynamicBugOrientation = "topleft" | "topright" | "bottomleft" | "bottomright";
|
6
|
+
export type DynamicBugConfig = {
|
7
|
+
__global: {
|
8
|
+
hardware?: HardwareAccelerationType;
|
9
|
+
dataDir?: string;
|
10
|
+
};
|
11
|
+
id: string;
|
12
|
+
displayName: string;
|
13
|
+
defaultBug?: string;
|
14
|
+
defaultOrientation?: DynamicBugOrientation;
|
15
|
+
};
|
16
|
+
export type DynamicBugState = {
|
17
|
+
activeBug?: {
|
18
|
+
file?: string;
|
19
|
+
orientation?: DynamicBugOrientation;
|
20
|
+
};
|
21
|
+
};
|
22
|
+
export type DynamicBugCommand = {
|
23
|
+
type: 'change-bug';
|
24
|
+
file?: string;
|
25
|
+
orientation?: DynamicBugOrientation;
|
26
|
+
};
|
27
|
+
export type DynamicBugEvent = {
|
28
|
+
type: 'bug-changed';
|
29
|
+
file?: string;
|
30
|
+
orientation?: DynamicBugOrientation;
|
31
|
+
};
|
32
|
+
export default class DynamicBugDefinition implements ServerComponentDefinition<DynamicBugConfig, DynamicBug, DynamicBugState, DynamicBugCommand, DynamicBugEvent> {
|
33
|
+
create(norsk: Norsk, cfg: DynamicBugConfig, cb: OnCreated<DynamicBug>, runtime: StudioRuntime<DynamicBugState, DynamicBugEvent>): Promise<void>;
|
34
|
+
routes(): Router;
|
35
|
+
handleCommand(node: DynamicBug, command: DynamicBugCommand): Promise<void>;
|
36
|
+
}
|
37
|
+
export declare class DynamicBug implements CreatedMediaNode, SubscribeDestination {
|
38
|
+
id: string;
|
39
|
+
relatedMediaNodes: RelatedMediaNodes;
|
40
|
+
norsk: Norsk;
|
41
|
+
cfg: DynamicBugConfig;
|
42
|
+
videoSource?: StudioNodeSubscriptionSource;
|
43
|
+
composeNode?: VideoComposeNode<"video" | "bug">;
|
44
|
+
imageSource?: FileImageInputNode;
|
45
|
+
initialised: Promise<void>;
|
46
|
+
updates: RuntimeUpdates<DynamicBugState, DynamicBugEvent>;
|
47
|
+
static create(norsk: Norsk, cfg: DynamicBugConfig, updates: RuntimeUpdates<DynamicBugState, DynamicBugEvent>): Promise<DynamicBug>;
|
48
|
+
constructor(norsk: Norsk, cfg: DynamicBugConfig, updates: RuntimeUpdates<DynamicBugState, DynamicBugEvent>);
|
49
|
+
sourceContextChange(_responseCallback: (error?: SubscriptionError | undefined) => void): Promise<boolean>;
|
50
|
+
setupBug(bug?: string, orientation?: DynamicBugOrientation): Promise<void>;
|
51
|
+
imagePart(orientation: DynamicBugOrientation): ComposePart<"bug">;
|
52
|
+
videoPart(): ComposePart<"video">;
|
53
|
+
initialise(): Promise<void>;
|
54
|
+
subscribe(sources: StudioNodeSubscriptionSource[]): void;
|
55
|
+
}
|
@@ -0,0 +1,156 @@
|
|
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.DynamicBug = void 0;
|
7
|
+
const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
|
8
|
+
const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-types");
|
9
|
+
const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
|
10
|
+
const config_1 = require("@norskvideo/norsk-studio/lib/shared/config");
|
11
|
+
const util_1 = require("@norskvideo/norsk-studio/lib/shared/util");
|
12
|
+
const express_1 = __importDefault(require("express"));
|
13
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
14
|
+
const path_1 = __importDefault(require("path"));
|
15
|
+
function bugDir() {
|
16
|
+
return path_1.default.resolve(process.env.NORSK_DATA_DIR || "data/bugs");
|
17
|
+
}
|
18
|
+
class DynamicBugDefinition {
|
19
|
+
async create(norsk, cfg, cb, runtime) {
|
20
|
+
const node = await DynamicBug.create(norsk, cfg, runtime.updates);
|
21
|
+
cb(node);
|
22
|
+
}
|
23
|
+
routes() {
|
24
|
+
const router = express_1.default.Router();
|
25
|
+
router.get("/bugs", async (_req, res) => {
|
26
|
+
const files = await promises_1.default.readdir(bugDir());
|
27
|
+
const images = files.filter((f) => {
|
28
|
+
return f.endsWith(".png") || f.endsWith(".jpg");
|
29
|
+
});
|
30
|
+
res.writeHead(200);
|
31
|
+
res.end(JSON.stringify(images));
|
32
|
+
});
|
33
|
+
return router;
|
34
|
+
}
|
35
|
+
async handleCommand(node, command) {
|
36
|
+
const commandType = command.type;
|
37
|
+
switch (commandType) {
|
38
|
+
case 'change-bug':
|
39
|
+
await node.setupBug(command.file, command.orientation);
|
40
|
+
break;
|
41
|
+
default:
|
42
|
+
(0, util_1.assertUnreachable)(commandType);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
exports.default = DynamicBugDefinition;
|
47
|
+
class DynamicBug {
|
48
|
+
id;
|
49
|
+
relatedMediaNodes = new runtime_types_1.RelatedMediaNodes();
|
50
|
+
norsk;
|
51
|
+
cfg;
|
52
|
+
videoSource;
|
53
|
+
composeNode;
|
54
|
+
imageSource;
|
55
|
+
initialised;
|
56
|
+
updates;
|
57
|
+
static async create(norsk, cfg, updates) {
|
58
|
+
const node = new DynamicBug(norsk, cfg, updates);
|
59
|
+
await node.initialised;
|
60
|
+
return node;
|
61
|
+
}
|
62
|
+
constructor(norsk, cfg, updates) {
|
63
|
+
this.cfg = cfg;
|
64
|
+
this.id = cfg.id;
|
65
|
+
this.norsk = norsk;
|
66
|
+
this.initialised = this.initialise();
|
67
|
+
this.updates = updates;
|
68
|
+
}
|
69
|
+
async sourceContextChange(_responseCallback) {
|
70
|
+
if (this.composeNode)
|
71
|
+
return false;
|
72
|
+
if (!this.videoSource) {
|
73
|
+
(0, logging_1.errorlog)("Context received by node, but no video source is presently active", { id: this.id });
|
74
|
+
return false;
|
75
|
+
}
|
76
|
+
const videoStream = this.videoSource.latestStreams()[0];
|
77
|
+
if (!videoStream) {
|
78
|
+
return false;
|
79
|
+
}
|
80
|
+
if (videoStream.metadata.message.case !== 'video') {
|
81
|
+
(0, logging_1.errorlog)("Media other than video received in dynamicBug node??", { id: this.id, metadata: videoStream.metadata });
|
82
|
+
return false;
|
83
|
+
}
|
84
|
+
this.composeNode = await this.norsk.processor.transform.videoCompose({
|
85
|
+
id: `${this.id}-compose`,
|
86
|
+
referenceStream: 'video',
|
87
|
+
referenceResolution: { width: 100, height: 100 },
|
88
|
+
hardwareAcceleration: (0, config_1.contractHardwareAcceleration)(this.cfg.__global.hardware, ["nvidia"]),
|
89
|
+
outputResolution: {
|
90
|
+
width: videoStream.metadata.message.value.width,
|
91
|
+
height: videoStream.metadata.message.value.height
|
92
|
+
},
|
93
|
+
parts: [this.videoPart()]
|
94
|
+
});
|
95
|
+
this.composeNode.subscribeToPins(this.videoSource.selectVideoToPin("video"));
|
96
|
+
this.relatedMediaNodes.addOutput(this.composeNode);
|
97
|
+
this.relatedMediaNodes.addInput(this.composeNode);
|
98
|
+
void this.setupBug(this.cfg.defaultBug, this.cfg.defaultOrientation);
|
99
|
+
return false;
|
100
|
+
}
|
101
|
+
async setupBug(bug, orientation) {
|
102
|
+
if (!bug) {
|
103
|
+
this.composeNode?.subscribeToPins(this.videoSource?.selectVideoToPin("video") || []);
|
104
|
+
this.updates.raiseEvent({ type: 'bug-changed' });
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
if (this.imageSource) {
|
108
|
+
await this.imageSource.close();
|
109
|
+
}
|
110
|
+
this.imageSource = await this.norsk.input.fileImage({
|
111
|
+
sourceName: `${this.id}-bug`,
|
112
|
+
fileName: path_1.default.join(bugDir(), bug)
|
113
|
+
});
|
114
|
+
this.composeNode?.updateConfig({
|
115
|
+
parts: [
|
116
|
+
this.videoPart(),
|
117
|
+
this.imagePart(orientation ?? 'topleft')
|
118
|
+
]
|
119
|
+
});
|
120
|
+
this.composeNode?.subscribeToPins((this.videoSource?.selectVideoToPin("video") ?? []).concat([
|
121
|
+
{ source: this.imageSource, sourceSelector: (0, norsk_sdk_1.videoToPin)("bug") }
|
122
|
+
]));
|
123
|
+
this.updates.raiseEvent({ type: 'bug-changed', file: bug, orientation });
|
124
|
+
}
|
125
|
+
imagePart(orientation) {
|
126
|
+
return {
|
127
|
+
id: "bug",
|
128
|
+
zIndex: 1,
|
129
|
+
sourceRect: { x: 0, y: 0, width: 100, height: 100 },
|
130
|
+
destRect: (orientation == 'topleft' ? { x: 0.1, y: 0.1, width: 5.0, height: 5.0 } :
|
131
|
+
orientation == 'topright' ? { x: 94.9, y: 0.1, width: 5.0, height: 5.0 } :
|
132
|
+
orientation == 'bottomleft' ? { x: 0.1, y: 94.9, width: 5.0, height: 5.0 } :
|
133
|
+
{ x: 94.9, y: 94.9, width: 5.0, height: 5.0 }),
|
134
|
+
opacity: 1.0,
|
135
|
+
pin: "bug"
|
136
|
+
};
|
137
|
+
}
|
138
|
+
videoPart() {
|
139
|
+
return {
|
140
|
+
id: "video",
|
141
|
+
zIndex: 0,
|
142
|
+
sourceRect: { x: 0, y: 0, width: 100, height: 100 },
|
143
|
+
destRect: { x: 0, y: 0, width: 100, height: 100 },
|
144
|
+
opacity: 1.0,
|
145
|
+
pin: "video"
|
146
|
+
};
|
147
|
+
}
|
148
|
+
async initialise() {
|
149
|
+
}
|
150
|
+
subscribe(sources) {
|
151
|
+
this.videoSource = sources[0];
|
152
|
+
this.videoSource.registerForContextChange(this);
|
153
|
+
}
|
154
|
+
}
|
155
|
+
exports.DynamicBug = DynamicBug;
|
156
|
+
//# sourceMappingURL=runtime.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/processor.dynamicBug/runtime.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAsJ;AAEtJ,wFAA8M;AAC9M,yEAAuE;AACvE,uEAAoH;AACpH,mEAA6E;AAE7E,sDAA8B;AAC9B,2DAA6B;AAC7B,gDAAwB;AAyCxB,SAAS,MAAM;IACb,OAAO,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,WAAW,CAAC,CAAC;AAEjE,CAAC;AAED,MAAqB,oBAAoB;IACvC,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAqB,EAAE,EAAyB,EAAE,OAAwD;QACnI,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAClE,EAAE,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IAED,MAAM;QACJ,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAA;QAE/B,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;YACzC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;gBAChC,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClD,CAAC,C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AAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;YACpD,OAAO,EAAE,GAAG;YACZ,GAAG,EAAE,KAAK;SACX,CAAA;IACH,CAAC;IAED,SAAS;QACP,OAAO;YACL,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,CAAC;YACT,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;YACnD,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;YACjD,OAAO,EAAE,GAAG;YACZ,GAAG,EAAE,OAAO;SACb,CAAA;IACH,CAAC;IAED,KAAK,CAAC,UAAU;IAChB,CAAC;IAED,SAAS,CAAC,OAAuC;QAC/C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF;AApID,gCAoIC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { DynamicBugState, DynamicBugConfig, DynamicBugCommand } from "./runtime";
|
2
|
+
declare function SummaryView({ state, config, sendCommand }: {
|
3
|
+
state: DynamicBugState;
|
4
|
+
config: DynamicBugConfig;
|
5
|
+
sendCommand: (cmd: DynamicBugCommand) => void;
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
7
|
+
export default SummaryView;
|
@@ -0,0 +1,33 @@
|
|
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
|
+
function SummaryView({ state, config, sendCommand }) {
|
6
|
+
const [bug, setBug] = (0, react_1.useState)(state.activeBug?.file ?? config.defaultBug);
|
7
|
+
const [orientation, setOrientation] = (0, react_1.useState)(state.activeBug?.orientation ?? config.defaultOrientation);
|
8
|
+
const [bugs, setBugs] = (0, react_1.useState)([]);
|
9
|
+
(0, react_1.useEffect)(() => {
|
10
|
+
const fn = async () => {
|
11
|
+
const result = await fetch('components/processor.dynamicBug/bugs');
|
12
|
+
if (result.ok && result.body) {
|
13
|
+
const bugs = await result.json();
|
14
|
+
setBugs(bugs);
|
15
|
+
}
|
16
|
+
else {
|
17
|
+
const text = await result.text();
|
18
|
+
throw new Error(text);
|
19
|
+
}
|
20
|
+
};
|
21
|
+
fn().catch(console.error);
|
22
|
+
}, []);
|
23
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { children: "Controls" }), (0, jsx_runtime_1.jsx)("label", { htmlFor: "select-preview", className: "mt-2", children: "Source" }), (0, jsx_runtime_1.jsxs)("select", { id: "select-bug", className: "mt-2 node-editor-select-input", onChange: (e) => {
|
24
|
+
setBug(e.currentTarget.value);
|
25
|
+
}, children: [(0, jsx_runtime_1.jsx)("option", { selected: bug === undefined, children: "---" }), bugs.map((s, i) => (0, jsx_runtime_1.jsx)("option", { selected: bug == s, value: s, children: s }, i))] }), (0, jsx_runtime_1.jsxs)("select", { id: "select-orientation", className: "mt-2 node-editor-select-input", onChange: (e) => {
|
26
|
+
setOrientation(e.currentTarget.value);
|
27
|
+
}, children: [(0, jsx_runtime_1.jsx)("option", { selected: orientation === undefined, children: "---" }), (0, jsx_runtime_1.jsx)("option", { value: 'topleft', selected: orientation === 'topleft', children: "Top Left" }), (0, jsx_runtime_1.jsx)("option", { value: 'topright', selected: orientation === 'topright', children: "Top Right" }), (0, jsx_runtime_1.jsx)("option", { value: 'bottomleft', selected: orientation === 'bottomleft', children: "Bottom Left" }), (0, jsx_runtime_1.jsx)("option", { value: 'bottomright', selected: orientation === 'bottomright', children: "Bottom Right" })] }), (bug != state.activeBug?.file || orientation != state.activeBug?.orientation) ? (0, jsx_runtime_1.jsx)("button", { type: "button", className: "mt-2 mb-2 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800", onClick: (e) => {
|
28
|
+
e.preventDefault();
|
29
|
+
sendCommand({ type: "change-bug", file: bug, orientation });
|
30
|
+
}, children: "Commit" }) : (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})] });
|
31
|
+
}
|
32
|
+
exports.default = SummaryView;
|
33
|
+
//# sourceMappingURL=summary-view.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"summary-view.js","sourceRoot":"","sources":["../../src/processor.dynamicBug/summary-view.tsx"],"names":[],"mappings":";;;AAAA,iCAA4C;AAG5C,SAAS,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAuG;IAEtJ,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,SAAS,EAAE,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC;IAC3E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,SAAS,EAAE,WAAW,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAC1G,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAW,EAAE,CAAC,CAAC;IAE/C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAG,KAAK,IAAI,EAAE;YACpB,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,sCAAsC,CAAC,CAAA;YAClE,IAAI,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC7B,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,EAAc,CAA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AC,QAAQ,EAAE,WAAW,KAAK,YAAY,4BAAsB,EACvF,mCAAQ,KAAK,EAAC,aAAa,EAAC,QAAQ,EAAE,WAAW,KAAK,aAAa,6BAAuB,IACnF,EAGR,CAAC,GAAG,IAAI,KAAK,CAAC,SAAS,EAAE,IAAI,IAAI,WAAW,IAAI,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,mCAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,wQAAwQ,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACvY,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,WAAW,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC;gBAC9D,CAAC,uBAAiB,CAAC,CAAC,CAAC,kDAAK,IACzB,CAAA;AACL,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@norskvideo/norsk-studio-built-ins",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"description": "",
|
5
5
|
"scripts": {
|
6
6
|
"clean": "rm -rf lib",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"@aws-sdk/client-mediapackage": "^3.499.0",
|
25
25
|
"@aws-sdk/client-translate": "^3.535.0",
|
26
26
|
"@norskvideo/norsk-sdk": "^1.0.360",
|
27
|
-
"@norskvideo/norsk-studio": "^1.0.
|
27
|
+
"@norskvideo/norsk-studio": "^1.0.4",
|
28
28
|
"@norskvideo/webrtc-client": "^0.1.2",
|
29
29
|
"express": "^4.18.2",
|
30
30
|
"express-ws": "^5.0.2"
|
@@ -58,4 +58,4 @@
|
|
58
58
|
"typescript": "^5.4.5",
|
59
59
|
"yaml": "^2.3.3"
|
60
60
|
}
|
61
|
-
}
|
61
|
+
}
|