Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin
2020-08-07 21:09:36 +03:00
21 changed files with 3845 additions and 3778 deletions

View File

@@ -8,7 +8,7 @@ import TelegramAudio
public enum RequestCallResult {
case requested
case alreadyInProgress(PeerId)
case alreadyInProgress(PeerId?)
}
public struct CallAuxiliaryServer {
@@ -46,15 +46,20 @@ public struct PresentationCallState: Equatable {
public enum VideoState: Equatable {
case notAvailable
case possible
case outgoingRequested
case incomingRequested(sendsVideo: Bool)
case inactive
case active
case paused
}
public enum RemoteVideoState: Equatable {
case inactive
case active
case paused
}
public enum RemoteAudioState: Equatable {
case active
case muted
}
public enum RemoteBatteryLevel: Equatable {
@@ -65,12 +70,14 @@ public struct PresentationCallState: Equatable {
public var state: State
public var videoState: VideoState
public var remoteVideoState: RemoteVideoState
public var remoteAudioState: RemoteAudioState
public var remoteBatteryLevel: RemoteBatteryLevel
public init(state: State, videoState: VideoState, remoteVideoState: RemoteVideoState, remoteBatteryLevel: RemoteBatteryLevel) {
public init(state: State, videoState: VideoState, remoteVideoState: RemoteVideoState, remoteAudioState: RemoteAudioState, remoteBatteryLevel: RemoteBatteryLevel) {
self.state = state
self.videoState = videoState
self.remoteVideoState = remoteVideoState
self.remoteAudioState = remoteAudioState
self.remoteBatteryLevel = remoteBatteryLevel
}
}
@@ -130,7 +137,7 @@ public protocol PresentationCall: class {
func toggleIsMuted()
func setIsMuted(_ value: Bool)
func requestVideo()
func acceptVideo()
func disableVideo()
func setOutgoingVideoIsPaused(_ isPaused: Bool)
func switchVideoCamera()
func setCurrentAudioOutput(_ output: AudioSessionOutput)