Merge pull request #1973 from restreamio/master
UI: Add Restream integration: stream info widget, channels widget
This commit is contained in:
commit
c36a86bb46
@ -172,19 +172,40 @@ void RestreamAuth::LoadUI()
|
||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
||||
info->setWidget(browser);
|
||||
|
||||
main->addDockWidget(Qt::RightDockWidgetArea, info.data());
|
||||
main->addDockWidget(Qt::LeftDockWidgetArea, info.data());
|
||||
infoMenu.reset(main->AddDockWidget(info.data()));
|
||||
|
||||
/* ----------------------------------- */
|
||||
|
||||
url = "https://restream.io/channel/embed";
|
||||
|
||||
channels.reset(new RestreamWidget());
|
||||
channels->setObjectName("restreamChannel");
|
||||
channels->resize(410, 600);
|
||||
channels->setMinimumSize(410, 300);
|
||||
channels->setWindowTitle(QTStr("RestreamAuth.Channels"));
|
||||
channels->setAllowedAreas(Qt::AllDockWidgetAreas);
|
||||
|
||||
browser = cef->create_widget(nullptr, url, panel_cookies);
|
||||
channels->setWidget(browser);
|
||||
|
||||
main->addDockWidget(Qt::LeftDockWidgetArea, channels.data());
|
||||
channelMenu.reset(main->AddDockWidget(channels.data()));
|
||||
|
||||
/* ----------------------------------- */
|
||||
|
||||
chat->setFloating(true);
|
||||
info->setFloating(true);
|
||||
chat->move(pos.x() + size.width() - chat->width() - 50, pos.y() + 50);
|
||||
info->move(pos.x() + 40, pos.y() + 50);
|
||||
channels->setFloating(true);
|
||||
|
||||
chat->move(pos.x() + size.width() - chat->width() - 30, pos.y() + 60);
|
||||
info->move(pos.x() + 20, pos.y() + 60);
|
||||
channels->move(pos.x() + 20 + info->width() + 10, pos.y() + 60);
|
||||
|
||||
if (firstLoad) {
|
||||
chat->setVisible(true);
|
||||
info->setVisible(true);
|
||||
channels->setVisible(true);
|
||||
} else {
|
||||
const char *dockStateStr = config_get_string(
|
||||
main->Config(), service(), "DockState");
|
||||
|
@ -9,8 +9,12 @@ class RestreamAuth : public OAuthStreamKey {
|
||||
|
||||
QSharedPointer<RestreamWidget> chat;
|
||||
QSharedPointer<RestreamWidget> info;
|
||||
QSharedPointer<RestreamWidget> channels;
|
||||
|
||||
QSharedPointer<QAction> chatMenu;
|
||||
QSharedPointer<QAction> infoMenu;
|
||||
QSharedPointer<QAction> channelMenu;
|
||||
|
||||
bool uiLoaded = false;
|
||||
|
||||
virtual bool RetryLogin() override;
|
||||
|
@ -115,6 +115,7 @@ TwitchAuth.Stats="Twitch Stats"
|
||||
TwitchAuth.Feed="Twitch Activity Feed"
|
||||
TwitchAuth.TwoFactorFail.Title="Could not query stream key"
|
||||
TwitchAuth.TwoFactorFail.Text="OBS was unable to connect to your Twitch account. Please make sure two-factor authentication is set up in your <a href='https://www.twitch.tv/settings/security'>Twitch security settings</a> as this is required to stream."
|
||||
RestreamAuth.Channels="Restream Channels"
|
||||
|
||||
# copy filters
|
||||
Copy.Filters="Copy Filters"
|
||||
|
@ -218,6 +218,9 @@ void AutoConfigTestPage::TestBandwidthThread()
|
||||
wiz->serviceName == "Restream.io - RTMP") {
|
||||
string_depad_key(key);
|
||||
key += "?test=true";
|
||||
} else if (wiz->serviceName == "Restream.io - FTL") {
|
||||
string_depad_key(key);
|
||||
key += "?test";
|
||||
}
|
||||
|
||||
obs_data_set_string(service_settings, "service",
|
||||
|
@ -575,6 +575,13 @@ void AutoConfigStreamPage::UpdateKeyLink()
|
||||
text += "</a>";
|
||||
|
||||
isYoutube = true;
|
||||
} else if (serviceName.startsWith("Restream.io")) {
|
||||
text += " <a href=\"https://";
|
||||
text += "restream.io/settings/streaming-setup?from=OBS";
|
||||
text += "\">";
|
||||
text += QTStr(
|
||||
"Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
|
||||
text += "</a>";
|
||||
}
|
||||
|
||||
if (isYoutube) {
|
||||
|
@ -198,6 +198,13 @@ void OBSBasicSettings::UpdateKeyLink()
|
||||
text += QTStr(
|
||||
"Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
|
||||
text += "</a>";
|
||||
} else if (serviceName.startsWith("Restream.io")) {
|
||||
text += " <a href=\"https://";
|
||||
text += "restream.io/settings/streaming-setup?from=OBS";
|
||||
text += "\">";
|
||||
text += QTStr(
|
||||
"Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
|
||||
text += "</a>";
|
||||
}
|
||||
|
||||
ui->streamKeyLabel->setText(text);
|
||||
|
Loading…
x
Reference in New Issue
Block a user