mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-12 02:35:38 +02:00
calls: hide preview if camera stream and no device available
+ remove record video message if no video device available Change-Id: I35c15709ecd5159dfa02ebcbf7aacd0bbf3d54e9
This commit is contained in:
parent
4a25228e40
commit
b9c7058b26
3 changed files with 3 additions and 20 deletions
|
@ -113,6 +113,7 @@ ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredWidth: JamiTheme.chatViewFooterButtonSize
|
Layout.preferredWidth: JamiTheme.chatViewFooterButtonSize
|
||||||
Layout.preferredHeight: JamiTheme.chatViewFooterButtonSize
|
Layout.preferredHeight: JamiTheme.chatViewFooterButtonSize
|
||||||
|
visible: VideoDevices.listSize !== 0
|
||||||
|
|
||||||
radius: JamiTheme.chatViewFooterButtonRadius
|
radius: JamiTheme.chatViewFooterButtonRadius
|
||||||
preferredSize: JamiTheme.chatViewFooterButtonIconSize
|
preferredSize: JamiTheme.chatViewFooterButtonIconSize
|
||||||
|
|
|
@ -179,24 +179,8 @@ Rectangle {
|
||||||
id: previewRenderer
|
id: previewRenderer
|
||||||
|
|
||||||
lrcInstance: LRCInstance
|
lrcInstance: LRCInstance
|
||||||
visible: !callOverlay.isAudioOnly && !callOverlay.isConferenceCall && !callOverlay.isVideoMuted && !callOverlay.isPaused
|
visible: !callOverlay.isAudioOnly && !callOverlay.isConferenceCall && !callOverlay.isVideoMuted && !callOverlay.isPaused &&
|
||||||
|
((VideoDevices.listSize !== 0 && AvAdapter.currentRenderingDeviceType === Video.DeviceType.CAMERA) || AvAdapter.currentRenderingDeviceType !== Video.DeviceType.CAMERA )
|
||||||
Connections {
|
|
||||||
target: CallAdapter
|
|
||||||
|
|
||||||
function onPreviewVisibilityNeedToChange(visible) {
|
|
||||||
previewRenderer.visible = visible
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: VideoDevices
|
|
||||||
|
|
||||||
// TODO: previewRenderer visible should be listening to a property
|
|
||||||
function onDeviceListChanged() {
|
|
||||||
previewRenderer.visible = VideoDevices.listSize !== 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
width: Math.max(callPageMainRect.width / 5, JamiTheme.minimumPreviewWidth)
|
width: Math.max(callPageMainRect.width / 5, JamiTheme.minimumPreviewWidth)
|
||||||
x: callPageMainRect.width - previewRenderer.width - previewMargin
|
x: callPageMainRect.width - previewRenderer.width - previewMargin
|
||||||
|
|
|
@ -90,7 +90,6 @@ Item {
|
||||||
participantOverlays = participantOverlays.filter(part => !deletedUris.includes(part.uri))
|
participantOverlays = participantOverlays.filter(part => !deletedUris.includes(part.uri))
|
||||||
|
|
||||||
if (infos.length === 0) { // Return to normal call
|
if (infos.length === 0) { // Return to normal call
|
||||||
previewRenderer.visible = !isAudioOnly && !isVideoMuted && !isConferenceCall && !isPaused
|
|
||||||
for (var part in participantOverlays) {
|
for (var part in participantOverlays) {
|
||||||
if (participantOverlays[part]) {
|
if (participantOverlays[part]) {
|
||||||
participantOverlays[part].destroy()
|
participantOverlays[part].destroy()
|
||||||
|
@ -98,7 +97,6 @@ Item {
|
||||||
}
|
}
|
||||||
participantOverlays = []
|
participantOverlays = []
|
||||||
} else {
|
} else {
|
||||||
previewRenderer.visible = false
|
|
||||||
for (var infoVariant in infos) {
|
for (var infoVariant in infos) {
|
||||||
// Only create overlay for new participants
|
// Only create overlay for new participants
|
||||||
if (!currentUris.includes(infos[infoVariant].uri)) {
|
if (!currentUris.includes(infos[infoVariant].uri)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue