Various conference adjustments

This commit is contained in:
Christophe Deschamps 2022-05-11 10:36:20 +02:00
parent 8c8825790d
commit e0af3af18b
3 changed files with 17 additions and 4 deletions

View file

@ -97,7 +97,7 @@ class ConferenceParticipantDeviceData {
core.usePreviewWindow(yesno: false)
core.nativePreviewWindow = view
} else {
participantDevice.nativeVideoWindowId = UnsafeMutableRawPointer(Unmanaged.passRetained(view).toOpaque())
participantDevice.nativeVideoWindowId = UnsafeMutableRawPointer(Unmanaged.passUnretained(view).toOpaque())
}
}
}

View file

@ -90,9 +90,6 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol
}
func reloadData() {
if (self.isHidden || conferenceViewModel?.conference.value?.call?.params?.conferenceVideoLayout != .ActiveSpeaker) {
return
}
self.grid.reloadData()
}
@ -212,6 +209,9 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol
self.addSubview(fullScreenMutableView)
fullScreenMutableView.matchParentSideBorders().alignUnder(view:headerView,withMargin: ActiveCallView.center_view_margin_top).alignParentBottom().done()
}
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.reloadData()
}
}
}
@ -219,6 +219,12 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol
// UICollectionView related delegates
func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
let gcell = (cell as! VoipActiveSpeakerParticipantCell)
gcell.participantData?.participantDevice.nativeVideoWindowId = nil
gcell.participantData?.clearObservers()
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return inter_cell
}
@ -230,6 +236,9 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
if (self.isHidden || conferenceViewModel?.conference.value?.call?.params?.conferenceVideoLayout != .ActiveSpeaker) {
return 0
}
guard let participantsCount = conferenceViewModel?.conferenceParticipantDevices.value?.count else {
return .zero
}

View file

@ -175,6 +175,7 @@ class VoipConferenceGridView: UIView, UICollectionViewDataSource, UICollectionVi
func reloadData() {
if (self.isHidden || conferenceViewModel?.conference.value?.call?.params?.conferenceVideoLayout != .Grid) {
self.grid.reloadData()
return
}
computeCellSize()
@ -205,6 +206,9 @@ class VoipConferenceGridView: UIView, UICollectionViewDataSource, UICollectionVi
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
if (self.isHidden || conferenceViewModel?.conference.value?.call?.params?.conferenceVideoLayout != .Grid) {
return 0
}
guard let participantsCount = conferenceViewModel?.conferenceParticipantDevices.value?.count else {
return .zero
}