mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Fix video members notices
This commit is contained in:
@@ -168,6 +168,26 @@ public protocol PresentationCall: class {
|
||||
func makeOutgoingVideoView(completion: @escaping (PresentationCallVideoView?) -> Void)
|
||||
}
|
||||
|
||||
public struct VoiceChatConfiguration {
|
||||
public static var defaultValue: VoiceChatConfiguration {
|
||||
return VoiceChatConfiguration(videoParticipantsMaxCount: 30)
|
||||
}
|
||||
|
||||
public let videoParticipantsMaxCount: Int32
|
||||
|
||||
fileprivate init(videoParticipantsMaxCount: Int32) {
|
||||
self.videoParticipantsMaxCount = videoParticipantsMaxCount
|
||||
}
|
||||
|
||||
public static func with(appConfiguration: AppConfiguration) -> VoiceChatConfiguration {
|
||||
if let data = appConfiguration.data, let value = data["groupcall_video_participants_max"] as? Double {
|
||||
return VoiceChatConfiguration(videoParticipantsMaxCount: Int32(value))
|
||||
} else {
|
||||
return .defaultValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct PresentationGroupCallState: Equatable {
|
||||
public enum NetworkState {
|
||||
case connecting
|
||||
@@ -191,6 +211,7 @@ public struct PresentationGroupCallState: Equatable {
|
||||
public var scheduleTimestamp: Int32?
|
||||
public var subscribedToScheduled: Bool
|
||||
public var isVideoEnabled: Bool
|
||||
public var isVideoWatchersLimitReached: Bool
|
||||
|
||||
public init(
|
||||
myPeerId: PeerId,
|
||||
@@ -204,7 +225,8 @@ public struct PresentationGroupCallState: Equatable {
|
||||
raisedHand: Bool,
|
||||
scheduleTimestamp: Int32?,
|
||||
subscribedToScheduled: Bool,
|
||||
isVideoEnabled: Bool
|
||||
isVideoEnabled: Bool,
|
||||
isVideoWatchersLimitReached: Bool
|
||||
) {
|
||||
self.myPeerId = myPeerId
|
||||
self.networkState = networkState
|
||||
@@ -218,6 +240,7 @@ public struct PresentationGroupCallState: Equatable {
|
||||
self.scheduleTimestamp = scheduleTimestamp
|
||||
self.subscribedToScheduled = subscribedToScheduled
|
||||
self.isVideoEnabled = isVideoEnabled
|
||||
self.isVideoWatchersLimitReached = isVideoWatchersLimitReached
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user