Allowing to disable the quick video setup feature #158

master
WolverinDEV 2021-01-06 18:48:50 +01:00
parent c5a85109b0
commit 1a533b0101
2 changed files with 9 additions and 1 deletions

View File

@ -569,6 +569,13 @@ export class Settings extends StaticSettings {
valueType: "boolean",
};
static readonly KEY_VIDEO_QUICK_SETUP: ValuedSettingsKey<boolean> = {
key: 'video_quick_setup',
defaultValue: true,
description: "Automatically select the default video device and start broadcasting without the video configure dialog.",
valueType: "boolean",
};
static readonly FN_LOG_ENABLED: (category: string) => SettingsKey<boolean> = category => {
return {
key: "log." + category.toLowerCase() + ".enabled",

View File

@ -18,6 +18,7 @@ import {spawnContextMenu} from "tc-shared/ui/ContextMenu";
import {ClientIcon} from "svg-sprites/client-icons";
import {createErrorModal} from "tc-shared/ui/elements/Modal";
import {VideoBroadcastType} from "tc-shared/connection/VideoConnection";
import {Settings, settings} from "tc-shared/settings";
const cssStyle = require("./Renderer.scss");
const cssButtonStyle = require("./Button.scss");
@ -278,7 +279,7 @@ const VideoButton = (props: { type: VideoBroadcastType }) => {
let dropdownText = props.type === "camera" ? tr("Start video broadcasting") : tr("Start screen sharing");
return (
<Button switched={true} colorTheme={"red"} autoSwitch={false} iconNormal={icon}
onToggle={() => events.fire("action_toggle_video", {enable: true, broadcastType: props.type, quickStart: true})}
onToggle={() => events.fire("action_toggle_video", {enable: true, broadcastType: props.type, quickStart: settings.static_global(Settings.KEY_VIDEO_QUICK_SETUP)})}
tooltip={tooltip} key={"enable"}>
<DropdownEntry icon={icon} text={dropdownText} onClick={() => events.fire("action_toggle_video", {enable: true, broadcastType: props.type})} />
{props.type === "camera" ? <VideoDeviceList key={"list"} /> : null}