Fix frozen camera preview

This commit is contained in:
Julien Wadel 2022-07-26 11:01:27 +02:00
parent 68cdf9df67
commit f5e8987618
2 changed files with 7 additions and 6 deletions

View file

@ -66,6 +66,7 @@ function openWaitingRoom(model){
// -----------------------------------------------------------------------------
// Used to get Component based from Call Status
function getContent (call, conferenceInfoModel) {
console.log("Changing contents")
if (call == null) {
if(conferenceInfoModel)
return waitingRoom
@ -83,6 +84,7 @@ function getContent (call, conferenceInfoModel) {
}
window.conferenceInfoModel = call.conferenceInfoModel;
if (status === CallModel.CallStatusOutgoing || status === CallModel.CallStatusEnded) {
console.log("Is conference ? "+call.isConference)
return waitingRoom
}

View file

@ -82,9 +82,9 @@ Item {
model: mainItem.callModel.isConference
? mainItem.participantDevices
: mainItem.callModel.videoEnabled
? [{modelData:null}]
? [{videoEnabled:true, isPreview:true}]
: []
onModelChanged: console.log(mainItem.callModel.videoEnabled + "/" +mainItem.callModel.cameraEnabled + " / " +count)
onModelChanged: console.log( mainItem.callModel.isConference+"/"+mainItem.callModel.videoEnabled + "/" +mainItem.callModel.cameraEnabled + " / " +count)
spacing: 15
verticalLayoutDirection: ItemView.BottomToTop
delegate:Item{
@ -95,10 +95,9 @@ Item {
id: miniView
anchors.fill: parent
anchors.margins: 3
deactivateCamera: index <0 || (!modelData && !mainItem.cameraEnabled) || !modelData.videoEnabled || (callModel && callModel.pausedByUser)
currentDevice: modelData
callModel: mainItem.callModel
deactivateCamera: index <0 || !mainItem.cameraEnabled || (!modelData.videoEnabled) || (callModel && callModel.pausedByUser)
currentDevice: modelData.isPreview ? null : modelData
callModel: modelData.isPreview ? null : mainItem.callModel
isCameraFromDevice: mainItem.callModel.isConference
isPaused: currentDevice && currentDevice.isPaused
showCloseButton: false