Added ability to start video chat with RTMP as well.
This commit is contained in:
parent
7cea4efac1
commit
40d97bc6a4
|
@ -2381,9 +2381,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_group_call_join_as_changed" = "Members of this voice chat will now see you as {name}";
|
"lng_group_call_join_as_changed" = "Members of this voice chat will now see you as {name}";
|
||||||
"lng_group_call_join_as_changed_channel" = "Members of this live stream will now see you as {name}";
|
"lng_group_call_join_as_changed_channel" = "Members of this live stream will now see you as {name}";
|
||||||
|
|
||||||
"lng_menu_start_group_call" = "Start live stream";
|
"lng_menu_start_group_call" = "Start video chat";
|
||||||
"lng_menu_start_group_call_scheduled" = "Schedule live stream";
|
"lng_menu_start_group_call_scheduled" = "Schedule video chat";
|
||||||
"lng_menu_start_group_call_with" = "Stream with...";
|
"lng_menu_start_group_call_with" = "Stream with...";
|
||||||
|
"lng_menu_start_group_call_channel" = "Start live stream";
|
||||||
|
"lng_menu_start_group_call_scheduled_channel" = "Schedule live stream";
|
||||||
|
"lng_menu_start_group_call_with_channel" = "Stream with...";
|
||||||
|
|
||||||
"lng_group_call_rtmp_title" = "Stream with other apps";
|
"lng_group_call_rtmp_title" = "Stream with other apps";
|
||||||
"lng_group_call_rtmp_url_subtitle" = "Server URL";
|
"lng_group_call_rtmp_url_subtitle" = "Server URL";
|
||||||
|
|
|
@ -243,7 +243,8 @@ void ChooseJoinAsBox(
|
||||||
auto next = (context == Context::Switch)
|
auto next = (context == Context::Switch)
|
||||||
? tr::lng_settings_save()
|
? tr::lng_settings_save()
|
||||||
: tr::lng_continue();
|
: tr::lng_continue();
|
||||||
if ((context == Context::Create) && !livestream) {
|
#if 0
|
||||||
|
if ((context == Context::Create)) {
|
||||||
const auto makeLink = [](const QString &text) {
|
const auto makeLink = [](const QString &text) {
|
||||||
return Ui::Text::Link(text);
|
return Ui::Text::Link(text);
|
||||||
};
|
};
|
||||||
|
@ -264,6 +265,7 @@ void ChooseJoinAsBox(
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
box->addButton(std::move(next), [=] {
|
box->addButton(std::move(next), [=] {
|
||||||
auto copy = info;
|
auto copy = info;
|
||||||
copy.joinAs = controller->selected();
|
copy.joinAs = controller->selected();
|
||||||
|
|
|
@ -65,9 +65,8 @@ constexpr auto kEmojiInteractionSeenDuration = 3 * crl::time(1000);
|
||||||
|
|
||||||
inline bool HasGroupCallMenu(const not_null<PeerData*> &peer) {
|
inline bool HasGroupCallMenu(const not_null<PeerData*> &peer) {
|
||||||
return !peer->groupCall()
|
return !peer->groupCall()
|
||||||
&& peer->isChannel()
|
&& ((peer->isChannel() && peer->asChannel()->amCreator())
|
||||||
&& !peer->isMegagroup()
|
|| (peer->isChat() && peer->asChat()->amCreator()));
|
||||||
&& peer->asChannel()->amCreator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -345,16 +344,23 @@ void TopBarWidget::showGroupCallMenu(not_null<PeerData*> peer) {
|
||||||
const auto callback = [=](Calls::StartGroupCallArgs &&args) {
|
const auto callback = [=](Calls::StartGroupCallArgs &&args) {
|
||||||
controller->startOrJoinGroupCall(peer, std::move(args));
|
controller->startOrJoinGroupCall(peer, std::move(args));
|
||||||
};
|
};
|
||||||
|
const auto livestream = !peer->isMegagroup() && peer->isChannel();
|
||||||
_menu->addAction(
|
_menu->addAction(
|
||||||
tr::lng_menu_start_group_call(tr::now),
|
livestream
|
||||||
|
? tr::lng_menu_start_group_call_channel(tr::now)
|
||||||
|
: tr::lng_menu_start_group_call(tr::now),
|
||||||
[=] { callback({}); },
|
[=] { callback({}); },
|
||||||
&st::menuIconStartStream);
|
&st::menuIconStartStream);
|
||||||
_menu->addAction(
|
_menu->addAction(
|
||||||
tr::lng_menu_start_group_call_scheduled(tr::now),
|
livestream
|
||||||
|
? tr::lng_menu_start_group_call_scheduled_channel(tr::now)
|
||||||
|
: tr::lng_menu_start_group_call_scheduled(tr::now),
|
||||||
[=] { callback({ .scheduleNeeded = true }); },
|
[=] { callback({ .scheduleNeeded = true }); },
|
||||||
&st::menuIconReschedule);
|
&st::menuIconReschedule);
|
||||||
_menu->addAction(
|
_menu->addAction(
|
||||||
tr::lng_menu_start_group_call_with(tr::now),
|
livestream
|
||||||
|
? tr::lng_menu_start_group_call_with_channel(tr::now)
|
||||||
|
: tr::lng_menu_start_group_call_with(tr::now),
|
||||||
[=] { callback({ .rtmpNeeded = true }); },
|
[=] { callback({ .rtmpNeeded = true }); },
|
||||||
&st::menuIconStartStreamWith);
|
&st::menuIconStartStreamWith);
|
||||||
_menu->moveToRight(
|
_menu->moveToRight(
|
||||||
|
|
Loading…
Reference in New Issue