UI: Add Start Streaming settings check on start

When we use the server error to respond to user's failing to start a
stream it is slow to return an error and unclear to the user what went
wrong. This diff introduces a simple settings check before attempting
to stream and catch and explain specific URL/key issues to the user.

In the case of preset services we check there is a Stream Key before
attempting to start a stream.

In the case of "custom" we only verify there is a URL since for some
services that's all that is required or the user may use user/password
authentication.
This commit is contained in:
JohannMG
2019-11-26 14:55:46 -08:00
committed by jp9000
parent c4396e03a7
commit b78cdc910b
4 changed files with 101 additions and 4 deletions

View File

@@ -5754,6 +5754,20 @@ void OBSBasic::on_streamButton_clicked()
return;
}
auto action =
UIValidation::StreamSettingsConfirmation(this, service);
switch (action) {
case StreamSettingsAction::ContinueStream:
break;
case StreamSettingsAction::OpenSettings:
on_action_Settings_triggered();
ui->streamButton->setChecked(false);
return;
case StreamSettingsAction::Cancel:
ui->streamButton->setChecked(false);
return;
}
bool confirm = config_get_bool(GetGlobalConfig(), "BasicWindow",
"WarnBeforeStartingStream");