mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
UI: Add channels widget to Restream.io integration
This commit is contained in:
parent
168ae0af8e
commit
484c57181c
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue