UI:Show "Get Stream Key" to users of Facebook CDN
Facebook provides CDN endpoints for users to optimize their bandwidth or latency using the speed test on facebook.com/live/ingests/. In this case streamers use a custom server endpoint that looks like "rtmps://edgetee-upload-fml.xx.fbcdn.net:443/rtmp/". This diff adds detection to users using the custom field for CDN endpoints so we can show the stream key link button.master
parent
c9001d0f98
commit
7f8f3ff3f9
|
@ -273,6 +273,10 @@ AutoConfigStreamPage::AutoConfigStreamPage(QWidget *parent)
|
||||||
SLOT(ServiceChanged()));
|
SLOT(ServiceChanged()));
|
||||||
connect(ui->customServer, SIGNAL(textChanged(const QString &)), this,
|
connect(ui->customServer, SIGNAL(textChanged(const QString &)), this,
|
||||||
SLOT(ServiceChanged()));
|
SLOT(ServiceChanged()));
|
||||||
|
connect(ui->customServer, SIGNAL(textChanged(const QString &)), this,
|
||||||
|
SLOT(UpdateKeyLink()));
|
||||||
|
connect(ui->customServer, SIGNAL(editingFinished()), this,
|
||||||
|
SLOT(UpdateKeyLink()));
|
||||||
connect(ui->doBandwidthTest, SIGNAL(toggled(bool)), this,
|
connect(ui->doBandwidthTest, SIGNAL(toggled(bool)), this,
|
||||||
SLOT(ServiceChanged()));
|
SLOT(ServiceChanged()));
|
||||||
|
|
||||||
|
@ -573,12 +577,8 @@ void AutoConfigStreamPage::ServiceChanged()
|
||||||
|
|
||||||
void AutoConfigStreamPage::UpdateKeyLink()
|
void AutoConfigStreamPage::UpdateKeyLink()
|
||||||
{
|
{
|
||||||
if (IsCustomService()) {
|
|
||||||
ui->doBandwidthTest->setEnabled(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString serviceName = ui->service->currentText();
|
QString serviceName = ui->service->currentText();
|
||||||
|
QString customServer = ui->customServer->text();
|
||||||
bool isYoutube = false;
|
bool isYoutube = false;
|
||||||
QString streamKeyLink;
|
QString streamKeyLink;
|
||||||
|
|
||||||
|
@ -591,7 +591,8 @@ void AutoConfigStreamPage::UpdateKeyLink()
|
||||||
} else if (serviceName.startsWith("Restream.io")) {
|
} else if (serviceName.startsWith("Restream.io")) {
|
||||||
streamKeyLink =
|
streamKeyLink =
|
||||||
"https://restream.io/settings/streaming-setup?from=OBS";
|
"https://restream.io/settings/streaming-setup?from=OBS";
|
||||||
} else if (serviceName == "Facebook Live") {
|
} else if (serviceName == "Facebook Live" ||
|
||||||
|
(customServer.contains("fbcdn.net") && IsCustomService())) {
|
||||||
streamKeyLink =
|
streamKeyLink =
|
||||||
"https://www.facebook.com/live/producer?ref=OBS";
|
"https://www.facebook.com/live/producer?ref=OBS";
|
||||||
} else if (serviceName.startsWith("Twitter")) {
|
} else if (serviceName.startsWith("Twitter")) {
|
||||||
|
|
|
@ -71,6 +71,10 @@ void OBSBasicSettings::InitStreamPage()
|
||||||
SLOT(UpdateServerList()));
|
SLOT(UpdateServerList()));
|
||||||
connect(ui->service, SIGNAL(currentIndexChanged(int)), this,
|
connect(ui->service, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(UpdateKeyLink()));
|
SLOT(UpdateKeyLink()));
|
||||||
|
connect(ui->customServer, SIGNAL(textChanged(const QString &)), this,
|
||||||
|
SLOT(UpdateKeyLink()));
|
||||||
|
connect(ui->customServer, SIGNAL(editingFinished(const QString &)),
|
||||||
|
this, SLOT(UpdateKeyLink()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OBSBasicSettings::LoadStream1Settings()
|
void OBSBasicSettings::LoadStream1Settings()
|
||||||
|
@ -208,12 +212,8 @@ void OBSBasicSettings::SaveStream1Settings()
|
||||||
|
|
||||||
void OBSBasicSettings::UpdateKeyLink()
|
void OBSBasicSettings::UpdateKeyLink()
|
||||||
{
|
{
|
||||||
if (IsCustomService()) {
|
|
||||||
ui->getStreamKeyButton->hide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString serviceName = ui->service->currentText();
|
QString serviceName = ui->service->currentText();
|
||||||
|
QString customServer = ui->customServer->text();
|
||||||
QString streamKeyLink;
|
QString streamKeyLink;
|
||||||
if (serviceName == "Twitch") {
|
if (serviceName == "Twitch") {
|
||||||
streamKeyLink =
|
streamKeyLink =
|
||||||
|
@ -223,7 +223,8 @@ void OBSBasicSettings::UpdateKeyLink()
|
||||||
} else if (serviceName.startsWith("Restream.io")) {
|
} else if (serviceName.startsWith("Restream.io")) {
|
||||||
streamKeyLink =
|
streamKeyLink =
|
||||||
"https://restream.io/settings/streaming-setup?from=OBS";
|
"https://restream.io/settings/streaming-setup?from=OBS";
|
||||||
} else if (serviceName == "Facebook Live") {
|
} else if (serviceName == "Facebook Live" ||
|
||||||
|
(customServer.contains("fbcdn.net") && IsCustomService())) {
|
||||||
streamKeyLink =
|
streamKeyLink =
|
||||||
"https://www.facebook.com/live/producer?ref=OBS";
|
"https://www.facebook.com/live/producer?ref=OBS";
|
||||||
} else if (serviceName.startsWith("Twitter")) {
|
} else if (serviceName.startsWith("Twitter")) {
|
||||||
|
|
Loading…
Reference in New Issue