mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
[WIP] Video chats
This commit is contained in:
@@ -664,6 +664,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
private var ssrcMapping: [UInt32: SsrcMapping] = [:]
|
||||
|
||||
private var requestedVideoChannels: [OngoingGroupCallContext.VideoChannel] = []
|
||||
private var suspendVideoChannelRequests: Bool = false
|
||||
private var pendingVideoSubscribers = Bag<(String, MetaDisposable, (OngoingGroupCallContext.VideoFrameData) -> Void)>()
|
||||
|
||||
private var summaryInfoState = Promise<SummaryInfoState?>(nil)
|
||||
@@ -1699,7 +1700,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
self.genericCallContext = genericCallContext
|
||||
self.stateVersionValue += 1
|
||||
|
||||
genericCallContext.setRequestedVideoChannels(self.requestedVideoChannels)
|
||||
genericCallContext.setRequestedVideoChannels(self.suspendVideoChannelRequests ? [] : self.requestedVideoChannels)
|
||||
self.connectPendingVideoSubscribers()
|
||||
}
|
||||
|
||||
@@ -3090,11 +3091,21 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
maxQuality: mappedMaxQuality
|
||||
)
|
||||
}
|
||||
if let genericCallContext = self.genericCallContext {
|
||||
if let genericCallContext = self.genericCallContext, !self.suspendVideoChannelRequests {
|
||||
genericCallContext.setRequestedVideoChannels(self.requestedVideoChannels)
|
||||
}
|
||||
}
|
||||
|
||||
public func setSuspendVideoChannelRequests(_ value: Bool) {
|
||||
if self.suspendVideoChannelRequests != value {
|
||||
self.suspendVideoChannelRequests = value
|
||||
|
||||
if let genericCallContext = self.genericCallContext {
|
||||
genericCallContext.setRequestedVideoChannels(self.suspendVideoChannelRequests ? [] : self.requestedVideoChannels)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func setCurrentAudioOutput(_ output: AudioSessionOutput) {
|
||||
guard self.currentSelectedAudioOutputValue != output else {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user