diff --git a/src/views/Edit/Sources/Network.js b/src/views/Edit/Sources/Network.js index 6c754e3..09e473e 100644 --- a/src/views/Edit/Sources/Network.js +++ b/src/views/Edit/Sources/Network.js @@ -59,10 +59,15 @@ const initSettings = (initialSettings, config) => { settings.rtsp = { udp: false, + transport: 'tcp', stimeout: 5000000, ...settings.rtsp, }; + if (settings.rtsp.udp === true) { + settings.rtsp.transport = 'udp'; + } + settings.http = { readNative: true, forceFramerate: false, @@ -321,11 +326,7 @@ const createInputs = (settings, config, skills) => { input.options.push('-timeout', settings.rtsp.stimeout); } - if (settings.rtsp.udp === true) { - input.options.push('-rtsp_transport', 'udp'); - } else { - input.options.push('-rtsp_transport', 'tcp'); - } + input.options.push('-rtsp_transport', settings.rtsp.transport); } } } @@ -527,7 +528,18 @@ function AdvancedSettings({ settings = {}, onChange = function (settings) {} }) - UDP transport} checked={settings.rtsp.udp} onChange={onChange('rtsp', 'udp')} /> +