mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-04 05:17:55 +00:00
Handle members slice loaded.
This commit is contained in:
parent
ba1dade4b0
commit
d9aa660253
@ -501,6 +501,25 @@ void GroupCall::subscribeToReal(not_null<Data::GroupCall*> real) {
|
||||
|
||||
const auto emptyEndpoint = std::string();
|
||||
|
||||
real->participantsSliceAdded(
|
||||
) | rpl::start_with_next([=] {
|
||||
const auto &participants = real->participants();
|
||||
for (const auto &participant : participants) {
|
||||
const auto camera = participant.cameraEndpoint();
|
||||
const auto screen = participant.screenEndpoint();
|
||||
if (!camera.empty()
|
||||
&& _activeVideoEndpoints.emplace(camera).second
|
||||
&& _incomingVideoEndpoints.contains(camera)) {
|
||||
_streamsVideoUpdated.fire({ camera, true });
|
||||
}
|
||||
if (!screen.empty()
|
||||
&& _activeVideoEndpoints.emplace(screen).second
|
||||
&& _incomingVideoEndpoints.contains(screen)) {
|
||||
_streamsVideoUpdated.fire({ screen, true });
|
||||
}
|
||||
}
|
||||
}, _lifetime);
|
||||
|
||||
using Update = Data::GroupCall::ParticipantUpdate;
|
||||
real->participantUpdated(
|
||||
) | rpl::start_with_next([=](const Update &data) {
|
||||
|
@ -1175,8 +1175,8 @@ void MembersController::setupListChangeViewers() {
|
||||
}
|
||||
_largeEndpoint = largeEndpoint;
|
||||
if (const auto participant = findParticipant(_largeEndpoint)) {
|
||||
if (participant->cameraEndpoint() == _largeEndpoint) {
|
||||
if (const auto row = findRow(participant->peer)) {
|
||||
if (const auto row = findRow(participant->peer)) {
|
||||
if (row->videoTrackEndpoint() == _largeEndpoint) {
|
||||
row->clearVideoTrack();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user