diff --git a/src/views/Edit/Sources/Network.js b/src/views/Edit/Sources/Network.js
index ace076c..993fbd9 100644
--- a/src/views/Edit/Sources/Network.js
+++ b/src/views/Edit/Sources/Network.js
@@ -108,7 +108,7 @@ const initConfig = (initialConfig) => {
local: 'localhost',
token: '',
passphrase: '',
- name: '',
+ name: 'external',
...config.srt,
};
@@ -181,8 +181,10 @@ const createInputs = (settings, config, skills) => {
if (settings.mode === 'push') {
if (settings.push.type === 'hls') {
input.address = getLocalHLS(config);
+ input.options.push('-analyzeduration', '20000000');
} else if (settings.push.type === 'rtmp') {
input.address = getLocalRTMP(config);
+ input.options.push('-analyzeduration', '3000000');
} else if (settings.push.type === 'srt') {
input.address = getLocalSRT(config);
} else {
@@ -315,14 +317,14 @@ const isAuthProtocol = (url) => {
const isSupportedProtocol = (url, supportedProtocols) => {
const protocol = getProtocol(url);
if (protocol.length === 0) {
- return 0;
+ return false;
}
if (!supportedProtocols.includes(protocol)) {
- return -1;
+ return false;
}
- return 1;
+ return true;
};
const getHLSAddress = (host, credentials, name, secure) => {
@@ -428,7 +430,7 @@ function Pull(props) {
Supports HTTP (HLS, DASH), RTP, RTSP, RTMP, SRT and more.
- {supportedProtocol === -1 && (
+ {!supportedProtocol ? (
@@ -437,8 +439,7 @@ function Pull(props) {
- )}
- {supportedProtocol === 1 && (
+ ) : (
{authProtocol && (
@@ -602,7 +603,7 @@ function Push(props) {
const supportsRTMP = isSupportedProtocol('rtmp://', props.skills.protocols.input);
const supportsSRT = isSupportedProtocol('srt://', props.skills.protocols.input);
- if (!supportsRTMP && supportsSRT) {
+ if (!supportsRTMP && !supportsSRT) {
return (