mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-22 22:28:08 +00:00
fix #LINQT-1308 video stats visibility
This commit is contained in:
parent
b8aa7d7ebc
commit
0ccf340499
2 changed files with 8 additions and 9 deletions
|
|
@ -424,13 +424,11 @@ void CallModel::onStateChanged(const std::shared_ptr<linphone::Call> &call,
|
|||
if (state == linphone::Call::State::StreamsRunning) {
|
||||
mDurationTimer.start();
|
||||
// After UpdatedByRemote, video direction could be changed.
|
||||
auto params = call->getRemoteParams();
|
||||
auto videoDirection = params ? params->getVideoDirection() : linphone::MediaDirection::Inactive;
|
||||
emit remoteVideoEnabledChanged(videoDirection == linphone::MediaDirection::SendOnly ||
|
||||
videoDirection == linphone::MediaDirection::SendRecv);
|
||||
videoDirection = call->getCurrentParams()->getVideoDirection();
|
||||
auto videoDirection = call->getCurrentParams()->getVideoDirection();
|
||||
emit localVideoEnabledChanged(videoDirection == linphone::MediaDirection::SendOnly ||
|
||||
videoDirection == linphone::MediaDirection::SendRecv);
|
||||
emit remoteVideoEnabledChanged(videoDirection == linphone::MediaDirection::RecvOnly ||
|
||||
videoDirection == linphone::MediaDirection::SendRecv);
|
||||
setConference(call->getConference());
|
||||
updateConferenceVideoLayout();
|
||||
} else if (state == linphone::Call::State::End) {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ AbstractWindow {
|
|||
property ConferenceGui conference: call && call.core.conference || null
|
||||
|
||||
property int conferenceLayout: call && call.core.conferenceVideoLayout || 0
|
||||
property bool localVideoEnabled: call && call.core.localVideoEnabled
|
||||
property bool remoteVideoEnabled: call && call.core.remoteVideoEnabled
|
||||
|
||||
property bool callTerminatedByUser: false
|
||||
property var callState: call ? call.core.state : LinphoneEnums.CallState.Idle
|
||||
|
|
@ -116,7 +118,6 @@ AbstractWindow {
|
|||
Connections {
|
||||
enabled: !!call
|
||||
target: call && call.core
|
||||
function onRemoteVideoEnabledChanged() { console.log("remote video enabled", call.core.remoteVideoEnabled)}
|
||||
function onSecurityUpdated() {
|
||||
if (call.core.encryption === LinphoneEnums.MediaEncryption.Zrtp) {
|
||||
if (call.core.tokenVerified) {
|
||||
|
|
@ -1211,8 +1212,8 @@ AbstractWindow {
|
|||
Layout.leftMargin: 16 * DefaultStyle.dp
|
||||
Layout.rightMargin: 16 * DefaultStyle.dp
|
||||
|
||||
visible: mainWindow.call && (mainWindow.call.core.localVideoEnabled || mainWindow.call.core.remoteVideoEnabled)
|
||||
|
||||
visible: mainWindow.localVideoEnabled || mainWindow.remoteVideoEnabled
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 12 * DefaultStyle.dp
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
|
@ -1464,7 +1465,7 @@ AbstractWindow {
|
|||
enabled: mainWindow.conferenceInfo || (mainWindow.callState === LinphoneEnums.CallState.Connected || mainWindow.callState === LinphoneEnums.CallState.StreamsRunning)
|
||||
iconUrl: AppIcons.videoCamera
|
||||
checkedIconUrl: AppIcons.videoCameraSlash
|
||||
checked: mainWindow.call && !mainWindow.call.core.localVideoEnabled
|
||||
checked: !mainWindow.localVideoEnabled
|
||||
Layout.preferredWidth: 55 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 55 * DefaultStyle.dp
|
||||
icon.width: 32 * DefaultStyle.dp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue