Fix bug with video_muted flag.

This commit is contained in:
John Preston 2021-04-27 21:31:16 +04:00
parent 36888f844f
commit 8342b2d275
2 changed files with 3 additions and 2 deletions

View File

@ -2066,7 +2066,7 @@ void GroupCall::sendSelfUpdate(SendUpdateType type) {
MTP_bool(muted() != MuteState::Active),
MTP_int(100000), // volume
MTP_bool(muted() == MuteState::RaisedHand),
MTP_bool(_videoOutgoing->state() == Webrtc::VideoState::Active)
MTP_bool(_videoOutgoing->state() != Webrtc::VideoState::Active)
)).done([=](const MTPUpdates &result) {
_updateMuteRequestId = 0;
_peer->session().api().applyUpdates(result);

View File

@ -690,7 +690,8 @@ bool Row::paintVideo(Painter &p, int x, int y, int size, PanelMode mode) {
_videoTrackShown->markFrameShown();
});
const auto videoSize = _videoTrackShown->frameSize();
if (videoSize.isEmpty()) {
if (videoSize.isEmpty()
|| _videoTrackShown->state() != Webrtc::VideoState::Active) {
return false;
}
const auto resize = (videoSize.width() > videoSize.height())