@norskvideo/norsk-studio-built-ins 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/info.js +224 -224
- package/lib/info.js +2 -2
- package/lib/info.js.map +1 -1
- package/lib/processor.onscreenGraphic/image-selection.d.ts +9 -0
- package/lib/{processor.dynamicBug/bug-selection.js → processor.onscreenGraphic/image-selection.js} +10 -10
- package/lib/processor.onscreenGraphic/image-selection.js.map +1 -0
- package/lib/processor.onscreenGraphic/info.d.ts +3 -0
- package/lib/{processor.dynamicBug → processor.onscreenGraphic}/info.js +10 -10
- package/lib/processor.onscreenGraphic/info.js.map +1 -0
- package/lib/processor.onscreenGraphic/runtime.d.ts +67 -0
- package/lib/{processor.dynamicBug → processor.onscreenGraphic}/runtime.js +75 -75
- package/lib/processor.onscreenGraphic/runtime.js.map +1 -0
- package/lib/processor.onscreenGraphic/summary-view.d.ts +4 -0
- package/lib/processor.onscreenGraphic/summary-view.js +128 -0
- package/lib/processor.onscreenGraphic/summary-view.js.map +1 -0
- package/lib/{processor.dynamicBug → processor.onscreenGraphic}/types.d.ts +2 -2
- package/lib/processor.onscreenGraphic/types.js.map +1 -0
- package/lib/{processor.dynamicBug → processor.onscreenGraphic}/types.yaml +7 -7
- package/lib/test/{dynamic-bug.js → onscreen-graphic.js} +79 -79
- package/lib/test/onscreen-graphic.js.map +1 -0
- package/package.json +3 -3
- package/lib/processor.dynamicBug/bug-selection.d.ts +0 -9
- package/lib/processor.dynamicBug/bug-selection.js.map +0 -1
- package/lib/processor.dynamicBug/info.d.ts +0 -3
- package/lib/processor.dynamicBug/info.js.map +0 -1
- package/lib/processor.dynamicBug/runtime.d.ts +0 -67
- package/lib/processor.dynamicBug/runtime.js.map +0 -1
- package/lib/processor.dynamicBug/summary-view.d.ts +0 -4
- package/lib/processor.dynamicBug/summary-view.js +0 -128
- package/lib/processor.dynamicBug/summary-view.js.map +0 -1
- package/lib/processor.dynamicBug/types.js.map +0 -1
- package/lib/test/dynamic-bug.js.map +0 -1
- /package/lib/{processor.dynamicBug → processor.onscreenGraphic}/types.js +0 -0
- /package/lib/test/{dynamic-bug.d.ts → onscreen-graphic.d.ts} +0 -0
package/client/info.js
CHANGED
@@ -273,9 +273,9 @@ var init_form_views = __esm({
|
|
273
273
|
}
|
274
274
|
});
|
275
275
|
|
276
|
-
//
|
276
|
+
// node_modules/@norskvideo/norsk-studio/lib/shared/shared-views.js
|
277
277
|
var require_shared_views = __commonJS({
|
278
|
-
"
|
278
|
+
"node_modules/@norskvideo/norsk-studio/lib/shared/shared-views.js"(exports) {
|
279
279
|
"use strict";
|
280
280
|
Object.defineProperty(exports, "__esModule", { value: true });
|
281
281
|
exports.GlobalIceServerView = GlobalIceServerView;
|
@@ -286,9 +286,9 @@ var require_shared_views = __commonJS({
|
|
286
286
|
}
|
287
287
|
});
|
288
288
|
|
289
|
-
//
|
289
|
+
// node_modules/@norskvideo/norsk-studio/lib/shared/config.js
|
290
290
|
var require_config = __commonJS({
|
291
|
-
"
|
291
|
+
"node_modules/@norskvideo/norsk-studio/lib/shared/config.js"(exports) {
|
292
292
|
"use strict";
|
293
293
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
294
294
|
if (k2 === void 0)
|
@@ -643,19 +643,89 @@ var init_inline_view6 = __esm({
|
|
643
643
|
}
|
644
644
|
});
|
645
645
|
|
646
|
-
// build/processor.
|
647
|
-
var
|
648
|
-
__export(
|
649
|
-
default: () =>
|
646
|
+
// build/processor.fixedLadder/rung-view.js
|
647
|
+
var rung_view_exports = {};
|
648
|
+
__export(rung_view_exports, {
|
649
|
+
default: () => rung_view_default
|
650
650
|
});
|
651
|
-
function
|
652
|
-
|
651
|
+
function rung_view_default(rung) {
|
652
|
+
return (0, import_jsx_runtime14.jsx)("div", { className: "", children: rung.name });
|
653
|
+
}
|
654
|
+
var import_jsx_runtime14;
|
655
|
+
var init_rung_view = __esm({
|
656
|
+
"build/processor.fixedLadder/rung-view.js"() {
|
657
|
+
"use strict";
|
658
|
+
import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
659
|
+
}
|
660
|
+
});
|
661
|
+
|
662
|
+
// build/processor.fixedLadder/codec-editor.js
|
663
|
+
var codec_editor_exports = {};
|
664
|
+
__export(codec_editor_exports, {
|
665
|
+
default: () => CodecEditor
|
666
|
+
});
|
667
|
+
function CodecEditor(props) {
|
668
|
+
(0, import_react13.useEffect)(() => {
|
669
|
+
if (props.defaultValue)
|
670
|
+
props.onChanged(props.defaultValue);
|
671
|
+
}, [props.defaultValue]);
|
672
|
+
const textAreaRef = (0, import_react13.useRef)(null);
|
673
|
+
const [value, setValue] = (0, import_react13.useState)(props.defaultValue);
|
653
674
|
(0, import_react13.useEffect)(() => {
|
675
|
+
if (textAreaRef.current) {
|
676
|
+
const target = textAreaRef.current;
|
677
|
+
target.style.height = "";
|
678
|
+
target.style.height = target.scrollHeight + "px";
|
679
|
+
}
|
680
|
+
}, []);
|
681
|
+
return (0, import_jsx_runtime15.jsx)("textarea", { ref: textAreaRef, className: "w-full min-h-fit dark:text-white dark:bg-black", onChange: (e) => {
|
682
|
+
const target = e.currentTarget;
|
683
|
+
try {
|
684
|
+
const codec = JSON.parse(target.value);
|
685
|
+
setValue(codec);
|
686
|
+
props.onChanged(codec);
|
687
|
+
} catch (e2) {
|
688
|
+
}
|
689
|
+
}, defaultValue: JSON.stringify(value, void 0, 2) });
|
690
|
+
}
|
691
|
+
var import_jsx_runtime15, import_react13;
|
692
|
+
var init_codec_editor = __esm({
|
693
|
+
"build/processor.fixedLadder/codec-editor.js"() {
|
694
|
+
"use strict";
|
695
|
+
import_jsx_runtime15 = __toESM(require_jsx_runtime());
|
696
|
+
import_react13 = __toESM(require_react());
|
697
|
+
}
|
698
|
+
});
|
699
|
+
|
700
|
+
// build/processor.fixedLadder/codec-view.js
|
701
|
+
var codec_view_exports = {};
|
702
|
+
__export(codec_view_exports, {
|
703
|
+
default: () => CodecEditor2
|
704
|
+
});
|
705
|
+
function CodecEditor2(props) {
|
706
|
+
return (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [props.width, "x", props.height] });
|
707
|
+
}
|
708
|
+
var import_jsx_runtime16;
|
709
|
+
var init_codec_view = __esm({
|
710
|
+
"build/processor.fixedLadder/codec-view.js"() {
|
711
|
+
"use strict";
|
712
|
+
import_jsx_runtime16 = __toESM(require_jsx_runtime());
|
713
|
+
}
|
714
|
+
});
|
715
|
+
|
716
|
+
// build/processor.onscreenGraphic/image-selection.js
|
717
|
+
var image_selection_exports = {};
|
718
|
+
__export(image_selection_exports, {
|
719
|
+
default: () => image_selection_default
|
720
|
+
});
|
721
|
+
function GraphicSelection(props) {
|
722
|
+
const [loading, setLoading] = (0, import_react15.useState)(true);
|
723
|
+
(0, import_react15.useEffect)(() => {
|
654
724
|
const fn = async () => {
|
655
|
-
const result2 = await fetch("components/processor.
|
725
|
+
const result2 = await fetch("components/processor.onscreenGraphic/graphics");
|
656
726
|
if (result2.ok && result2.body) {
|
657
|
-
const
|
658
|
-
|
727
|
+
const graphics = await result2.json();
|
728
|
+
setGraphics(graphics);
|
659
729
|
setLoading(false);
|
660
730
|
if (props.defaultValue)
|
661
731
|
props.onChanged(props.defaultValue);
|
@@ -666,65 +736,65 @@ function BugSelection(props) {
|
|
666
736
|
};
|
667
737
|
fn().catch(console.error);
|
668
738
|
}, []);
|
669
|
-
const [
|
739
|
+
const [graphcs, setGraphics] = (0, import_react15.useState)([]);
|
670
740
|
if (loading) {
|
671
|
-
return (0,
|
741
|
+
return (0, import_jsx_runtime17.jsx)("div", { children: "Loading.." });
|
672
742
|
}
|
673
|
-
if (
|
674
|
-
return (0,
|
743
|
+
if (graphcs.length == 0) {
|
744
|
+
return (0, import_jsx_runtime17.jsx)("div", { children: "No graphics loaded" });
|
675
745
|
}
|
676
|
-
return (0,
|
677
|
-
return (0,
|
746
|
+
return (0, import_jsx_runtime17.jsx)("div", { children: (0, import_jsx_runtime17.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime17.jsx)("option", { value: "", children: "---" }, "empty"), graphcs.map((o, i) => {
|
747
|
+
return (0, import_jsx_runtime17.jsx)("option", { value: o, children: o }, i);
|
678
748
|
})] }) });
|
679
749
|
function myOnChange(e) {
|
680
750
|
props.onChanged(e.target.value);
|
681
751
|
}
|
682
752
|
}
|
683
|
-
var
|
684
|
-
var
|
685
|
-
"build/processor.
|
753
|
+
var import_jsx_runtime17, import_react15, image_selection_default;
|
754
|
+
var init_image_selection = __esm({
|
755
|
+
"build/processor.onscreenGraphic/image-selection.js"() {
|
686
756
|
"use strict";
|
687
|
-
|
688
|
-
|
689
|
-
|
757
|
+
import_jsx_runtime17 = __toESM(require_jsx_runtime());
|
758
|
+
import_react15 = __toESM(require_react());
|
759
|
+
image_selection_default = GraphicSelection;
|
690
760
|
}
|
691
761
|
});
|
692
762
|
|
693
|
-
// build/processor.
|
763
|
+
// build/processor.onscreenGraphic/summary-view.js
|
694
764
|
var summary_view_exports3 = {};
|
695
765
|
__export(summary_view_exports3, {
|
696
766
|
default: () => summary_view_default3
|
697
767
|
});
|
698
768
|
function SummaryView5({ state, sendCommand, urls }) {
|
699
|
-
const [
|
700
|
-
const [position, setPosition] = (0,
|
701
|
-
const [
|
702
|
-
const [fileToUpload, setFileToUpload] = (0,
|
703
|
-
const [showFileInput, setShowFileInput] = (0,
|
704
|
-
const [showUploadButton, setShowUploadButton] = (0,
|
705
|
-
const [uploadStatus, setUploadStatus] = (0,
|
706
|
-
const [showDeleteDropdown, setShowDeleteDropdown] = (0,
|
707
|
-
const [
|
708
|
-
const
|
769
|
+
const [graphic, setGraphic] = (0, import_react16.useState)(state.activeGraphic?.file);
|
770
|
+
const [position, setPosition] = (0, import_react16.useState)(state.activeGraphic?.position);
|
771
|
+
const [graphics, setGraphics] = (0, import_react16.useState)([]);
|
772
|
+
const [fileToUpload, setFileToUpload] = (0, import_react16.useState)(void 0);
|
773
|
+
const [showFileInput, setShowFileInput] = (0, import_react16.useState)(false);
|
774
|
+
const [showUploadButton, setShowUploadButton] = (0, import_react16.useState)(false);
|
775
|
+
const [uploadStatus, setUploadStatus] = (0, import_react16.useState)({ success: false, message: null });
|
776
|
+
const [showDeleteDropdown, setShowDeleteDropdown] = (0, import_react16.useState)(false);
|
777
|
+
const [graphicToDelete, setGraphicToDelete] = (0, import_react16.useState)("");
|
778
|
+
const updateGraphics = (0, import_react16.useCallback)(async () => {
|
709
779
|
try {
|
710
|
-
const result2 = await fetch(`${urls.componentUrl}/
|
780
|
+
const result2 = await fetch(`${urls.componentUrl}/graphics`);
|
711
781
|
if (result2.ok) {
|
712
|
-
const
|
713
|
-
|
782
|
+
const newGraphics = await result2.json();
|
783
|
+
setGraphics(newGraphics);
|
714
784
|
} else {
|
715
785
|
throw new Error(await result2.text());
|
716
786
|
}
|
717
787
|
} catch (error) {
|
718
|
-
console.error("Failed to update
|
788
|
+
console.error("Failed to update graphics:", error);
|
719
789
|
setUploadStatus({
|
720
790
|
success: false,
|
721
|
-
message: "Failed to update
|
791
|
+
message: "Failed to update graphic list."
|
722
792
|
});
|
723
793
|
}
|
724
794
|
}, [urls.componentUrl]);
|
725
|
-
(0,
|
726
|
-
|
727
|
-
}, [
|
795
|
+
(0, import_react16.useEffect)(() => {
|
796
|
+
updateGraphics().catch(console.error);
|
797
|
+
}, [updateGraphics]);
|
728
798
|
const onFileChange = (e) => {
|
729
799
|
const file = e.target.files?.[0];
|
730
800
|
setFileToUpload(file);
|
@@ -737,7 +807,7 @@ function SummaryView5({ state, sendCommand, urls }) {
|
|
737
807
|
try {
|
738
808
|
const form = new FormData();
|
739
809
|
form.append("file", fileToUpload);
|
740
|
-
const response = await fetch(`${urls.componentUrl}/
|
810
|
+
const response = await fetch(`${urls.componentUrl}/graphics`, {
|
741
811
|
method: "POST",
|
742
812
|
body: form
|
743
813
|
});
|
@@ -745,7 +815,7 @@ function SummaryView5({ state, sendCommand, urls }) {
|
|
745
815
|
const errorData = await response.json();
|
746
816
|
setUploadStatus({
|
747
817
|
success: false,
|
748
|
-
message: `${errorData.error}. Delete the existing
|
818
|
+
message: `${errorData.error}. Delete the existing graphic first if you want to replace it.`
|
749
819
|
});
|
750
820
|
} else if (!response.ok) {
|
751
821
|
throw new Error("Upload failed");
|
@@ -754,138 +824,68 @@ function SummaryView5({ state, sendCommand, urls }) {
|
|
754
824
|
setShowFileInput(false);
|
755
825
|
setUploadStatus({
|
756
826
|
success: true,
|
757
|
-
message: "
|
827
|
+
message: "Graphic uploaded successfully!"
|
758
828
|
});
|
759
|
-
await
|
829
|
+
await updateGraphics();
|
760
830
|
}
|
761
831
|
} catch (error) {
|
762
832
|
console.error("Failed to upload file:", error);
|
763
|
-
setUploadStatus({ success: false, message: "Failed to upload
|
833
|
+
setUploadStatus({ success: false, message: "Failed to upload graphic." });
|
764
834
|
}
|
765
835
|
setTimeout(() => setUploadStatus({ success: false, message: null }), 5e3);
|
766
836
|
};
|
767
837
|
const deleteBug = async () => {
|
768
|
-
if (!
|
838
|
+
if (!graphicToDelete)
|
769
839
|
return;
|
770
840
|
try {
|
771
|
-
const response = await fetch(`${urls.componentUrl}/
|
841
|
+
const response = await fetch(`${urls.componentUrl}/graphic`, {
|
772
842
|
method: "DELETE",
|
773
843
|
headers: {
|
774
844
|
"Content-Type": "application/json"
|
775
845
|
},
|
776
|
-
body: JSON.stringify({ filename:
|
846
|
+
body: JSON.stringify({ filename: graphicToDelete })
|
777
847
|
});
|
778
848
|
if (response.ok) {
|
779
849
|
setUploadStatus({
|
780
850
|
success: true,
|
781
|
-
message: "
|
851
|
+
message: "Graphic deleted successfully!"
|
782
852
|
});
|
783
|
-
await
|
784
|
-
if (
|
785
|
-
|
853
|
+
await updateGraphics();
|
854
|
+
if (graphic === graphicToDelete) {
|
855
|
+
setGraphic(void 0);
|
786
856
|
sendCommand({
|
787
|
-
type: "change-
|
857
|
+
type: "change-graphic",
|
788
858
|
file: void 0,
|
789
859
|
position: void 0
|
790
860
|
});
|
791
861
|
}
|
792
|
-
|
862
|
+
setGraphicToDelete("");
|
793
863
|
setShowDeleteDropdown(false);
|
794
864
|
} else {
|
795
865
|
const errorData = await response.json();
|
796
866
|
setUploadStatus({
|
797
867
|
success: false,
|
798
|
-
message: errorData.error || "Failed to delete
|
868
|
+
message: errorData.error || "Failed to delete graphic"
|
799
869
|
});
|
800
870
|
}
|
801
871
|
} catch (error) {
|
802
|
-
console.error("Failed to delete
|
803
|
-
setUploadStatus({ success: false, message: "Failed to delete
|
872
|
+
console.error("Failed to delete graphic:", error);
|
873
|
+
setUploadStatus({ success: false, message: "Failed to delete graphic" });
|
804
874
|
}
|
805
875
|
setTimeout(() => setUploadStatus({ success: false, message: null }), 3e3);
|
806
876
|
};
|
807
877
|
const buttonClass = "mt-2 mb-5 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";
|
808
878
|
const deleteButtonClass = "mt-2 text-white w-full justify-center bg-red-600 hover:bg-red-700 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-700 dark:hover:bg-red-800 dark:focus:ring-red-900";
|
809
879
|
const fileInputClass = "block w-full text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400";
|
810
|
-
return (0,
|
880
|
+
return (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-3", children: [(0, import_jsx_runtime18.jsx)("h2", { className: "text-xl font-bold text-gray-900 dark:text-white", children: "Controls" }), (0, import_jsx_runtime18.jsxs)("div", { children: [(0, import_jsx_runtime18.jsx)("label", { htmlFor: "select-graphic", className: "block text-gray-900 dark:text-white mb-1", children: "Source" }), (0, import_jsx_runtime18.jsxs)("select", { id: "select-graphic", className: "w-full node-editor-select-input", value: graphic || "", onChange: (e) => setGraphic(e.target.value || void 0), children: [(0, import_jsx_runtime18.jsx)("option", { value: "", children: "---" }), graphics.map((s) => (0, import_jsx_runtime18.jsx)("option", { value: s, children: s }, s))] })] }), graphic && (0, import_jsx_runtime18.jsxs)("div", { children: [(0, import_jsx_runtime18.jsx)("label", { htmlFor: "select-position", className: "block text-gray-900 dark:text-white mb-1", children: "Position" }), (0, import_jsx_runtime18.jsxs)("select", { id: "select-position", className: "w-full node-editor-select-input", value: position, onChange: (e) => setPosition(e.target.value), children: [(0, import_jsx_runtime18.jsx)("option", { value: "topleft", children: "Top Left" }), (0, import_jsx_runtime18.jsx)("option", { value: "topright", children: "Top Right" }), (0, import_jsx_runtime18.jsx)("option", { value: "bottomleft", children: "Bottom Left" }), (0, import_jsx_runtime18.jsx)("option", { value: "bottomright", children: "Bottom Right" })] })] }), (graphic !== state.activeGraphic?.file || position !== state.activeGraphic?.position) && (0, import_jsx_runtime18.jsx)("button", { type: "button", className: buttonClass, onClick: () => sendCommand({ type: "change-graphic", file: graphic, position }), children: "Commit" }), !showFileInput && !uploadStatus.success && (0, import_jsx_runtime18.jsx)("button", { type: "button", className: buttonClass, onClick: () => setShowFileInput(true), style: { marginBottom: "1rem" }, children: "Upload Graphic" }), showFileInput && (0, import_jsx_runtime18.jsxs)("form", { style: { display: "block", marginBottom: "1rem" }, children: [(0, import_jsx_runtime18.jsx)("input", { type: "file", id: "file", name: "filename", onChange: onFileChange, className: fileInputClass }), showUploadButton && (0, import_jsx_runtime18.jsx)("button", { type: "button", className: buttonClass, onClick: uploadFile, children: "Upload" })] }), (0, import_jsx_runtime18.jsx)("button", { type: "button", className: deleteButtonClass, onClick: () => setShowDeleteDropdown(!showDeleteDropdown), style: { marginBottom: "1rem" }, children: showDeleteDropdown ? "Hide Delete Options" : "Delete Graphics" }), showDeleteDropdown && (0, import_jsx_runtime18.jsxs)("div", { className: "mt-2 p-2 bg-gray-100 dark:bg-gray-800 rounded-lg", children: [(0, import_jsx_runtime18.jsx)("h3", { className: "text-lg font-semibold mb-2 text-gray-900 dark:text-white", children: "Select Graphic to Delete" }), (0, import_jsx_runtime18.jsxs)("select", { className: "w-full mb-2 node-editor-select-input", value: graphicToDelete, onChange: (e) => setGraphicToDelete(e.target.value), children: [(0, import_jsx_runtime18.jsx)("option", { value: "", children: " Select a graphic" }), graphics.map((graphicName) => (0, import_jsx_runtime18.jsx)("option", { value: graphicName, children: graphicName }, graphicName))] }), (0, import_jsx_runtime18.jsx)("button", { onClick: deleteBug, disabled: !graphicToDelete, className: `${deleteButtonClass} ${!graphicToDelete ? "opacity-50 cursor-not-allowed" : ""}`, children: "Delete Selected Graphic" })] }), uploadStatus.message && (0, import_jsx_runtime18.jsx)("div", { className: `mt-2 text-center ${uploadStatus.success ? "text-green-600" : "text-red-600"}`, children: uploadStatus.message })] });
|
811
881
|
}
|
812
|
-
var
|
882
|
+
var import_jsx_runtime18, import_react16, summary_view_default3;
|
813
883
|
var init_summary_view3 = __esm({
|
814
|
-
"build/processor.
|
815
|
-
"use strict";
|
816
|
-
import_jsx_runtime15 = __toESM(require_jsx_runtime());
|
817
|
-
import_react14 = __toESM(require_react());
|
818
|
-
summary_view_default3 = SummaryView5;
|
819
|
-
}
|
820
|
-
});
|
821
|
-
|
822
|
-
// build/processor.fixedLadder/rung-view.js
|
823
|
-
var rung_view_exports = {};
|
824
|
-
__export(rung_view_exports, {
|
825
|
-
default: () => rung_view_default
|
826
|
-
});
|
827
|
-
function rung_view_default(rung) {
|
828
|
-
return (0, import_jsx_runtime16.jsx)("div", { className: "", children: rung.name });
|
829
|
-
}
|
830
|
-
var import_jsx_runtime16;
|
831
|
-
var init_rung_view = __esm({
|
832
|
-
"build/processor.fixedLadder/rung-view.js"() {
|
833
|
-
"use strict";
|
834
|
-
import_jsx_runtime16 = __toESM(require_jsx_runtime());
|
835
|
-
}
|
836
|
-
});
|
837
|
-
|
838
|
-
// build/processor.fixedLadder/codec-editor.js
|
839
|
-
var codec_editor_exports = {};
|
840
|
-
__export(codec_editor_exports, {
|
841
|
-
default: () => CodecEditor
|
842
|
-
});
|
843
|
-
function CodecEditor(props) {
|
844
|
-
(0, import_react16.useEffect)(() => {
|
845
|
-
if (props.defaultValue)
|
846
|
-
props.onChanged(props.defaultValue);
|
847
|
-
}, [props.defaultValue]);
|
848
|
-
const textAreaRef = (0, import_react16.useRef)(null);
|
849
|
-
const [value, setValue] = (0, import_react16.useState)(props.defaultValue);
|
850
|
-
(0, import_react16.useEffect)(() => {
|
851
|
-
if (textAreaRef.current) {
|
852
|
-
const target = textAreaRef.current;
|
853
|
-
target.style.height = "";
|
854
|
-
target.style.height = target.scrollHeight + "px";
|
855
|
-
}
|
856
|
-
}, []);
|
857
|
-
return (0, import_jsx_runtime17.jsx)("textarea", { ref: textAreaRef, className: "w-full min-h-fit dark:text-white dark:bg-black", onChange: (e) => {
|
858
|
-
const target = e.currentTarget;
|
859
|
-
try {
|
860
|
-
const codec = JSON.parse(target.value);
|
861
|
-
setValue(codec);
|
862
|
-
props.onChanged(codec);
|
863
|
-
} catch (e2) {
|
864
|
-
}
|
865
|
-
}, defaultValue: JSON.stringify(value, void 0, 2) });
|
866
|
-
}
|
867
|
-
var import_jsx_runtime17, import_react16;
|
868
|
-
var init_codec_editor = __esm({
|
869
|
-
"build/processor.fixedLadder/codec-editor.js"() {
|
870
|
-
"use strict";
|
871
|
-
import_jsx_runtime17 = __toESM(require_jsx_runtime());
|
872
|
-
import_react16 = __toESM(require_react());
|
873
|
-
}
|
874
|
-
});
|
875
|
-
|
876
|
-
// build/processor.fixedLadder/codec-view.js
|
877
|
-
var codec_view_exports = {};
|
878
|
-
__export(codec_view_exports, {
|
879
|
-
default: () => CodecEditor2
|
880
|
-
});
|
881
|
-
function CodecEditor2(props) {
|
882
|
-
return (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [props.width, "x", props.height] });
|
883
|
-
}
|
884
|
-
var import_jsx_runtime18;
|
885
|
-
var init_codec_view = __esm({
|
886
|
-
"build/processor.fixedLadder/codec-view.js"() {
|
884
|
+
"build/processor.onscreenGraphic/summary-view.js"() {
|
887
885
|
"use strict";
|
888
886
|
import_jsx_runtime18 = __toESM(require_jsx_runtime());
|
887
|
+
import_react16 = __toESM(require_react());
|
888
|
+
summary_view_default3 = SummaryView5;
|
889
889
|
}
|
890
890
|
});
|
891
891
|
|
@@ -16534,90 +16534,13 @@ function assertUnreachable7(_) {
|
|
16534
16534
|
throw new Error("Didn't expect to get here");
|
16535
16535
|
}
|
16536
16536
|
|
16537
|
-
// build/processor.
|
16537
|
+
// build/processor.fixedLadder/info.js
|
16538
|
+
var import_react14 = __toESM(require_react());
|
16538
16539
|
var import_config4 = __toESM(require_config());
|
16539
|
-
var import_react15 = __toESM(require_react());
|
16540
16540
|
function info_default16({ defineComponent, Video }) {
|
16541
|
-
const
|
16542
|
-
const
|
16543
|
-
|
16544
|
-
identifier: "processor.dynamicBug",
|
16545
|
-
category: "processor",
|
16546
|
-
name: "Dynamic Bug",
|
16547
|
-
description: "",
|
16548
|
-
subscription: {
|
16549
|
-
// Only accept a single video stream
|
16550
|
-
accepts: {
|
16551
|
-
type: "single-stream",
|
16552
|
-
media: Video
|
16553
|
-
},
|
16554
|
-
produces: {
|
16555
|
-
type: "single-stream",
|
16556
|
-
media: Video
|
16557
|
-
}
|
16558
|
-
},
|
16559
|
-
extraValidation: function(ctx) {
|
16560
|
-
ctx.requireVideo(1);
|
16561
|
-
},
|
16562
|
-
display: (desc) => {
|
16563
|
-
return {
|
16564
|
-
default: desc.config.initialBug ?? "none"
|
16565
|
-
};
|
16566
|
-
},
|
16567
|
-
runtime: {
|
16568
|
-
summary: SummaryView6,
|
16569
|
-
initialState: () => ({}),
|
16570
|
-
handleEvent: (ev, state) => {
|
16571
|
-
const evType = ev.type;
|
16572
|
-
switch (evType) {
|
16573
|
-
case "bug-changed":
|
16574
|
-
return { ...state, activeBug: { file: ev.file, position: ev.position } };
|
16575
|
-
default:
|
16576
|
-
assertUnreachable8(evType);
|
16577
|
-
}
|
16578
|
-
}
|
16579
|
-
},
|
16580
|
-
configForm: {
|
16581
|
-
global: {
|
16582
|
-
hardware: (0, import_config4.HardwareSelection)()
|
16583
|
-
},
|
16584
|
-
form: {
|
16585
|
-
initialBug: {
|
16586
|
-
help: "The initial bug to render on the video (if any)",
|
16587
|
-
hint: {
|
16588
|
-
type: "custom",
|
16589
|
-
optional: true,
|
16590
|
-
component: BugSelection2
|
16591
|
-
}
|
16592
|
-
},
|
16593
|
-
initialPosition: {
|
16594
|
-
help: "The initial location at which to render the bug",
|
16595
|
-
hint: {
|
16596
|
-
type: "select",
|
16597
|
-
optional: true,
|
16598
|
-
options: [
|
16599
|
-
{ value: "topleft", display: "Top Left" },
|
16600
|
-
{ value: "topright", display: "Top Right" },
|
16601
|
-
{ value: "bottomleft", display: "Bottom Left" },
|
16602
|
-
{ value: "bottomright", display: "Bottom Right" }
|
16603
|
-
]
|
16604
|
-
}
|
16605
|
-
}
|
16606
|
-
}
|
16607
|
-
}
|
16608
|
-
});
|
16609
|
-
}
|
16610
|
-
function assertUnreachable8(_) {
|
16611
|
-
throw new Error("Didn't expect to get here");
|
16612
|
-
}
|
16613
|
-
|
16614
|
-
// build/processor.fixedLadder/info.js
|
16615
|
-
var import_react17 = __toESM(require_react());
|
16616
|
-
var import_config5 = __toESM(require_config());
|
16617
|
-
function info_default17({ defineComponent, Video }) {
|
16618
|
-
const RungView = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_rung_view(), rung_view_exports)));
|
16619
|
-
const CodecEditor3 = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_codec_editor(), codec_editor_exports)));
|
16620
|
-
const CodecView = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_codec_view(), codec_view_exports)));
|
16541
|
+
const RungView = import_react14.default.lazy(async () => Promise.resolve().then(() => (init_rung_view(), rung_view_exports)));
|
16542
|
+
const CodecEditor3 = import_react14.default.lazy(async () => Promise.resolve().then(() => (init_codec_editor(), codec_editor_exports)));
|
16543
|
+
const CodecView = import_react14.default.lazy(async () => Promise.resolve().then(() => (init_codec_view(), codec_view_exports)));
|
16621
16544
|
return defineComponent({
|
16622
16545
|
identifier: "processor.fixedLadder",
|
16623
16546
|
category: "processor",
|
@@ -16657,7 +16580,7 @@ function info_default17({ defineComponent, Video }) {
|
|
16657
16580
|
},
|
16658
16581
|
configForm: {
|
16659
16582
|
global: {
|
16660
|
-
hardware: (0,
|
16583
|
+
hardware: (0, import_config4.HardwareSelection)()
|
16661
16584
|
},
|
16662
16585
|
form: {
|
16663
16586
|
rungs: {
|
@@ -16779,7 +16702,7 @@ function createSoftwareRung(rung) {
|
|
16779
16702
|
case "h264_320x180":
|
16780
16703
|
return createRungImpl({ name: rung, threads: 1, bitrate: 800 });
|
16781
16704
|
default:
|
16782
|
-
return
|
16705
|
+
return assertUnreachable8(rung);
|
16783
16706
|
}
|
16784
16707
|
}
|
16785
16708
|
function createMa35dRung(rung) {
|
@@ -16793,7 +16716,7 @@ function createMa35dRung(rung) {
|
|
16793
16716
|
case "h264_320x180":
|
16794
16717
|
return createMa35DH264RungImpl({ name: rung, bitrate: 1e3 });
|
16795
16718
|
default:
|
16796
|
-
return
|
16719
|
+
return assertUnreachable8(rung);
|
16797
16720
|
}
|
16798
16721
|
}
|
16799
16722
|
function createNvidiaRung(rung) {
|
@@ -16807,7 +16730,7 @@ function createNvidiaRung(rung) {
|
|
16807
16730
|
case "h264_320x180":
|
16808
16731
|
return createNvidiaRungImpl({ name: rung, bitrate: 8e5 });
|
16809
16732
|
default:
|
16810
|
-
return
|
16733
|
+
return assertUnreachable8(rung);
|
16811
16734
|
}
|
16812
16735
|
}
|
16813
16736
|
function createQuadraRung(rung) {
|
@@ -16821,7 +16744,7 @@ function createQuadraRung(rung) {
|
|
16821
16744
|
case "h264_320x180":
|
16822
16745
|
return createQuadraRungImpl({ name: rung, bitrate: 8e5 });
|
16823
16746
|
default:
|
16824
|
-
return
|
16747
|
+
return assertUnreachable8(rung);
|
16825
16748
|
}
|
16826
16749
|
}
|
16827
16750
|
function createLoganRung(rung) {
|
@@ -16835,7 +16758,7 @@ function createLoganRung(rung) {
|
|
16835
16758
|
case "h264_320x180":
|
16836
16759
|
return createLoganRungImpl({ name: rung, bitrate: 8e5 });
|
16837
16760
|
default:
|
16838
|
-
return
|
16761
|
+
return assertUnreachable8(rung);
|
16839
16762
|
}
|
16840
16763
|
}
|
16841
16764
|
function createRungImpl({ name, threads, bitrate }) {
|
@@ -16933,6 +16856,83 @@ function rungWidth(rungName) {
|
|
16933
16856
|
function rungHeight(rungName) {
|
16934
16857
|
return parseInt(rungName.split("_")[1].split(`x`)[1]);
|
16935
16858
|
}
|
16859
|
+
function assertUnreachable8(_) {
|
16860
|
+
throw new Error("Didn't expect to get here");
|
16861
|
+
}
|
16862
|
+
|
16863
|
+
// build/processor.onscreenGraphic/info.js
|
16864
|
+
var import_config5 = __toESM(require_config());
|
16865
|
+
var import_react17 = __toESM(require_react());
|
16866
|
+
function info_default17({ defineComponent, Video }) {
|
16867
|
+
const GraphicSelection2 = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_image_selection(), image_selection_exports)));
|
16868
|
+
const SummaryView6 = import_react17.default.lazy(async () => Promise.resolve().then(() => (init_summary_view3(), summary_view_exports3)));
|
16869
|
+
return defineComponent({
|
16870
|
+
identifier: "processor.onscreenGraphic",
|
16871
|
+
category: "processor",
|
16872
|
+
name: "Onscreen Graphic",
|
16873
|
+
description: "",
|
16874
|
+
subscription: {
|
16875
|
+
// Only accept a single video stream
|
16876
|
+
accepts: {
|
16877
|
+
type: "single-stream",
|
16878
|
+
media: Video
|
16879
|
+
},
|
16880
|
+
produces: {
|
16881
|
+
type: "single-stream",
|
16882
|
+
media: Video
|
16883
|
+
}
|
16884
|
+
},
|
16885
|
+
extraValidation: function(ctx) {
|
16886
|
+
ctx.requireVideo(1);
|
16887
|
+
},
|
16888
|
+
display: (desc) => {
|
16889
|
+
return {
|
16890
|
+
default: desc.config.initialGraphic ?? "none"
|
16891
|
+
};
|
16892
|
+
},
|
16893
|
+
runtime: {
|
16894
|
+
summary: SummaryView6,
|
16895
|
+
initialState: () => ({}),
|
16896
|
+
handleEvent: (ev, state) => {
|
16897
|
+
const evType = ev.type;
|
16898
|
+
switch (evType) {
|
16899
|
+
case "graphic-changed":
|
16900
|
+
return { ...state, activeGraphic: { file: ev.file, position: ev.position } };
|
16901
|
+
default:
|
16902
|
+
assertUnreachable9(evType);
|
16903
|
+
}
|
16904
|
+
}
|
16905
|
+
},
|
16906
|
+
configForm: {
|
16907
|
+
global: {
|
16908
|
+
hardware: (0, import_config5.HardwareSelection)()
|
16909
|
+
},
|
16910
|
+
form: {
|
16911
|
+
initialGraphic: {
|
16912
|
+
help: "The initial graphic to render on the video (if any)",
|
16913
|
+
hint: {
|
16914
|
+
type: "custom",
|
16915
|
+
optional: true,
|
16916
|
+
component: GraphicSelection2
|
16917
|
+
}
|
16918
|
+
},
|
16919
|
+
initialPosition: {
|
16920
|
+
help: "The initial location at which to render the graphic",
|
16921
|
+
hint: {
|
16922
|
+
type: "select",
|
16923
|
+
optional: true,
|
16924
|
+
options: [
|
16925
|
+
{ value: "topleft", display: "Top Left" },
|
16926
|
+
{ value: "topright", display: "Top Right" },
|
16927
|
+
{ value: "bottomleft", display: "Bottom Left" },
|
16928
|
+
{ value: "bottomright", display: "Bottom Right" }
|
16929
|
+
]
|
16930
|
+
}
|
16931
|
+
}
|
16932
|
+
}
|
16933
|
+
}
|
16934
|
+
});
|
16935
|
+
}
|
16936
16936
|
function assertUnreachable9(_) {
|
16937
16937
|
throw new Error("Didn't expect to get here");
|
16938
16938
|
}
|
package/lib/info.js
CHANGED
@@ -47,9 +47,9 @@ const info_14 = __importDefault(require("./processor.browserOverlay/info"));
|
|
47
47
|
AllComponents.push((r) => (0, info_14.default)(r));
|
48
48
|
const info_15 = __importDefault(require("./processor.cascadingSwitch/info"));
|
49
49
|
AllComponents.push((r) => (0, info_15.default)(r));
|
50
|
-
const info_16 = __importDefault(require("./processor.
|
50
|
+
const info_16 = __importDefault(require("./processor.fixedLadder/info"));
|
51
51
|
AllComponents.push((r) => (0, info_16.default)(r));
|
52
|
-
const info_17 = __importDefault(require("./processor.
|
52
|
+
const info_17 = __importDefault(require("./processor.onscreenGraphic/info"));
|
53
53
|
AllComponents.push((r) => (0, info_17.default)(r));
|
54
54
|
const info_18 = __importDefault(require("./processor.whisper-transcribe/info"));
|
55
55
|
AllComponents.push((r) => (0, info_18.default)(r));
|