diff --git a/UI/forms/AutoConfigStreamPage.ui b/UI/forms/AutoConfigStreamPage.ui
index c52e3797928f25fc085e75e9e0191820d9353bb2..7eec15fa9e9e3d9886380a4000b37513483b9e92 100644
--- a/UI/forms/AutoConfigStreamPage.ui
+++ b/UI/forms/AutoConfigStreamPage.ui
@@ -6,8 +6,8 @@
0
0
- 566
- 335
+ 692
+ 407
@@ -44,6 +44,9 @@
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+ 12
+
-
@@ -73,6 +76,19 @@
-
+ -
+
+
+ Qt::Vertical
+
+
+
+ 12
+ 12
+
+
+
+
@@ -279,6 +295,13 @@
+ -
+
+
+ Basic.AutoConfig.StreamPage.GetStreamKey
+
+
+
@@ -321,22 +344,6 @@
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 87
- 17
-
-
-
-
-
@@ -347,7 +354,7 @@
- -
+
-
BandwidthTest.Region
@@ -384,26 +391,46 @@
- -
+
-
Basic.AutoConfig.StreamPage.ConnectAccount
- -
+
-
Basic.AutoConfig.StreamPage.DisconnectAccount
+ -
+
+
+ Qt::Vertical
+
+
+
+ 6
+ 6
+
+
+
+
+
+
+ UrlPushButton
+ QPushButton
+
+
+
diff --git a/UI/window-basic-auto-config.cpp b/UI/window-basic-auto-config.cpp
index 36a97600fca868615d6c92b35fcc088737a5717e..663251568d229abe0377623ec75d8cb133a3f6d5 100644
--- a/UI/window-basic-auto-config.cpp
+++ b/UI/window-basic-auto-config.cpp
@@ -1,13 +1,14 @@
-#include "window-basic-auto-config.hpp"
-#include "window-basic-main.hpp"
-#include "qt-wrappers.hpp"
-#include "obs-app.hpp"
-
#include
#include
#include
+#include "window-basic-auto-config.hpp"
+#include "window-basic-main.hpp"
+#include "qt-wrappers.hpp"
+#include "obs-app.hpp"
+#include "url-push-button.hpp"
+
#include "ui_AutoConfigStartPage.h"
#include "ui_AutoConfigVideoPage.h"
#include "ui_AutoConfigStreamPage.h"
@@ -289,7 +290,7 @@ int AutoConfigStreamPage::nextId() const
return AutoConfig::TestPage;
}
-inline bool AutoConfigStreamPage::IsCustom() const
+inline bool AutoConfigStreamPage::IsCustomService() const
{
return ui->service->currentData().toInt() == (int)ListOpt::Custom;
}
@@ -299,7 +300,7 @@ bool AutoConfigStreamPage::validatePage()
OBSData service_settings = obs_data_create();
obs_data_release(service_settings);
- wiz->customServer = IsCustom();
+ wiz->customServer = IsCustomService();
const char *serverType = wiz->customServer ? "rtmp_custom"
: "rtmp_common";
@@ -480,7 +481,7 @@ void AutoConfigStreamPage::ServiceChanged()
std::string service = QT_TO_UTF8(ui->service->currentText());
bool regionBased = service == "Twitch" || service == "Smashcast";
bool testBandwidth = ui->doBandwidthTest->isChecked();
- bool custom = IsCustom();
+ bool custom = IsCustomService();
ui->disconnectAccount->setVisible(false);
@@ -553,51 +554,37 @@ void AutoConfigStreamPage::ServiceChanged()
void AutoConfigStreamPage::UpdateKeyLink()
{
- bool custom = IsCustom();
+ if (IsCustomService()) {
+ ui->doBandwidthTest->setEnabled(true);
+ return;
+ }
+
QString serviceName = ui->service->currentText();
bool isYoutube = false;
+ QString streamKeyLink;
- if (custom)
- serviceName = "";
-
- QString text = QTStr("Basic.AutoConfig.StreamPage.StreamKey");
if (serviceName == "Twitch") {
- text += " ";
- text += QTStr(
- "Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
- text += "";
+ streamKeyLink =
+ "https://www.twitch.tv/broadcast/dashboard/streamkey";
} else if (serviceName == "YouTube / YouTube Gaming") {
- text += " ";
- text += QTStr(
- "Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
- text += "";
-
+ streamKeyLink = "https://www.youtube.com/live_dashboard";
isYoutube = true;
} else if (serviceName.startsWith("Restream.io")) {
- text += " ";
- text += QTStr(
- "Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
- text += "";
- } else if (serviceName == "YouStreamer") {
- text += " ";
- text += QTStr(
- "Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
- text += "";
+ streamKeyLink =
+ "https://restream.io/settings/streaming-setup?from=OBS";
} else if (serviceName == "Facebook Live") {
- text += " ";
- text += QTStr(
- "Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
- text += "";
+ streamKeyLink = "https://www.facebook.com/live/create?ref=OBS";
+ } else if (serviceName.startsWith("Twitter")) {
+ streamKeyLink = "https://www.pscp.tv/account/producer";
+ } else if (serviceName.startsWith("YouStreamer")) {
+ streamKeyLink = "https://www.app.youstreamer.com/stream/";
+ }
+
+ if (QString(streamKeyLink).isNull()) {
+ ui->streamKeyButton->hide();
+ } else {
+ ui->streamKeyButton->setTargetUrl(QUrl(streamKeyLink));
+ ui->streamKeyButton->show();
}
if (isYoutube) {
@@ -606,8 +593,6 @@ void AutoConfigStreamPage::UpdateKeyLink()
} else {
ui->doBandwidthTest->setEnabled(true);
}
-
- ui->streamKeyLabel->setText(text);
}
void AutoConfigStreamPage::LoadServices(bool showAll)
@@ -704,7 +689,7 @@ void AutoConfigStreamPage::UpdateCompleted()
(ui->key->text().isEmpty() && !auth)) {
ready = false;
} else {
- bool custom = IsCustom();
+ bool custom = IsCustomService();
if (custom) {
ready = !ui->customServer->text().isEmpty();
} else {
diff --git a/UI/window-basic-auto-config.hpp b/UI/window-basic-auto-config.hpp
index 97e4df380c482f702e9c65b2045baad5c506984a..874bacb43a492887d35bf9f4435d8d7883bd396a 100644
--- a/UI/window-basic-auto-config.hpp
+++ b/UI/window-basic-auto-config.hpp
@@ -173,7 +173,7 @@ class AutoConfigStreamPage : public QWizardPage {
bool ready = false;
void LoadServices(bool showAll);
- inline bool IsCustom() const;
+ inline bool IsCustomService() const;
public:
AutoConfigStreamPage(QWidget *parent = nullptr);
diff --git a/UI/window-basic-settings-stream.cpp b/UI/window-basic-settings-stream.cpp
index 3c741196e3d5f767ee91e8bcfc39770152356915..94ee6ae1ceb91ec7808a781aef23741f3cb4287e 100644
--- a/UI/window-basic-settings-stream.cpp
+++ b/UI/window-basic-settings-stream.cpp
@@ -216,18 +216,19 @@ void OBSBasicSettings::UpdateKeyLink()
QString serviceName = ui->service->currentText();
QString streamKeyLink;
if (serviceName == "Twitch") {
- streamKeyLink = QTStr(
- "https://www.twitch.tv/broadcast/dashboard/streamkey");
+ streamKeyLink =
+ "https://www.twitch.tv/broadcast/dashboard/streamkey";
} else if (serviceName == "YouTube / YouTube Gaming") {
- streamKeyLink = QTStr("https://www.youtube.com/live_dashboard");
+ streamKeyLink = "https://www.youtube.com/live_dashboard";
} else if (serviceName.startsWith("Restream.io")) {
- streamKeyLink = QTStr(
- "https://restream.io/settings/streaming-setup?from=OBS");
+ streamKeyLink =
+ "https://restream.io/settings/streaming-setup?from=OBS";
} else if (serviceName == "Facebook Live") {
- streamKeyLink +=
- QTStr("https://www.facebook.com/live/create?ref=OBS");
+ streamKeyLink = "https://www.facebook.com/live/create?ref=OBS";
} else if (serviceName.startsWith("Twitter")) {
- streamKeyLink = QTStr("https://www.pscp.tv/account/producer");
+ streamKeyLink = "https://www.pscp.tv/account/producer";
+ } else if (serviceName.startsWith("YouStreamer")) {
+ streamKeyLink = "https://www.app.youstreamer.com/stream/";
}
if (QString(streamKeyLink).isNull()) {