mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Volume adjustment
This commit is contained in:
parent
c4b2bfaab4
commit
d906e94c0b
@ -294,7 +294,6 @@ public protocol PresentationGroupCall: class {
|
||||
func toggleIsMuted()
|
||||
func setIsMuted(action: PresentationGroupCallMuteAction)
|
||||
func updateDefaultParticipantsAreMuted(isMuted: Bool)
|
||||
func setVolume(peerId: PeerId, volume: Double)
|
||||
func setCurrentAudioOutput(_ output: AudioSessionOutput)
|
||||
|
||||
func updateMuteState(peerId: PeerId, isMuted: Bool)
|
||||
|
@ -57,12 +57,12 @@ func callListViewForLocationAndType(locationAndType: CallListNodeLocationAndType
|
||||
return (CallListNodeViewUpdate(view: view, type: .Generic, scrollPosition: nil), locationAndType.type)
|
||||
}
|
||||
case let .changeType(index):
|
||||
return account.viewTracker.callListView(type: locationAndType.type, index: index, count: 120) |> map { view -> (CallListNodeViewUpdate, CallListViewType) in
|
||||
return account.viewTracker.callListView(type: locationAndType.type, index: index, count: 200) |> map { view -> (CallListNodeViewUpdate, CallListViewType) in
|
||||
return (CallListNodeViewUpdate(view: view, type: .ReloadAnimated, scrollPosition: nil), locationAndType.type)
|
||||
}
|
||||
case let .navigation(index):
|
||||
var first = true
|
||||
return account.viewTracker.callListView(type: locationAndType.type, index: index, count: 120) |> map { view -> (CallListNodeViewUpdate, CallListViewType) in
|
||||
return account.viewTracker.callListView(type: locationAndType.type, index: index, count: 200) |> map { view -> (CallListNodeViewUpdate, CallListViewType) in
|
||||
let genericType: CallListNodeViewUpdateType
|
||||
if first {
|
||||
first = false
|
||||
@ -76,7 +76,7 @@ func callListViewForLocationAndType(locationAndType: CallListNodeLocationAndType
|
||||
let directionHint: ListViewScrollToItemDirectionHint = sourceIndex > index ? .Down : .Up
|
||||
let callScrollPosition: CallListNodeViewScrollPosition = .index(index: index, position: scrollPosition, directionHint: directionHint, animated: animated)
|
||||
var first = true
|
||||
return account.viewTracker.callListView(type: locationAndType.type, index: index, count: 120) |> map { view -> (CallListNodeViewUpdate, CallListViewType) in
|
||||
return account.viewTracker.callListView(type: locationAndType.type, index: index, count: 200) |> map { view -> (CallListNodeViewUpdate, CallListViewType) in
|
||||
let genericType: CallListNodeViewUpdateType
|
||||
let scrollPosition: CallListNodeViewScrollPosition? = first ? callScrollPosition : nil
|
||||
if first {
|
||||
|
@ -1235,15 +1235,6 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
}
|
||||
}
|
||||
|
||||
public func setVolume(peerId: PeerId, volume: Double) {
|
||||
for (ssrc, id) in self.ssrcMapping {
|
||||
if id == peerId {
|
||||
self.callContext?.setVolume(ssrc: ssrc, volume: volume)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func setCurrentAudioOutput(_ output: AudioSessionOutput) {
|
||||
guard self.currentSelectedAudioOutputValue != output else {
|
||||
return
|
||||
|
@ -133,10 +133,6 @@ public final class OngoingGroupCallContext {
|
||||
})
|
||||
}
|
||||
|
||||
func setVolume(ssrc: UInt32, volume: Double) {
|
||||
self.context.setVolumeForSsrc(ssrc, volume: volume)
|
||||
}
|
||||
|
||||
func stop() {
|
||||
self.context.stop()
|
||||
}
|
||||
@ -246,12 +242,6 @@ public final class OngoingGroupCallContext {
|
||||
}
|
||||
}
|
||||
|
||||
public func setVolume(ssrc: UInt32, volume: Double) {
|
||||
self.impl.with { impl in
|
||||
impl.setVolume(ssrc: ssrc, volume: volume)
|
||||
}
|
||||
}
|
||||
|
||||
public func stop() {
|
||||
self.impl.with { impl in
|
||||
impl.stop()
|
||||
|
@ -168,8 +168,6 @@ typedef NS_ENUM(int32_t, GroupCallNetworkState) {
|
||||
- (void)removeSsrcs:(NSArray<NSNumber *> * _Nonnull)ssrcs;
|
||||
- (void)setIsMuted:(bool)isMuted;
|
||||
|
||||
- (void)setVolumeForSsrc:(uint32_t)ssrc volume:(double)volume;
|
||||
|
||||
- (void)switchAudioOutput:(NSString * _Nonnull)deviceId;
|
||||
- (void)switchAudioInput:(NSString * _Nonnull)deviceId;
|
||||
|
||||
|
@ -1052,12 +1052,6 @@ static void (*InternalVoipLoggingFunction)(NSString *) = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setVolumeForSsrc:(uint32_t)ssrc volume:(double)volume {
|
||||
if (_instance) {
|
||||
_instance->setVolume(ssrc, volume);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)switchAudioOutput:(NSString * _Nonnull)deviceId {
|
||||
if (_instance) {
|
||||
_instance->setAudioOutputDevice(deviceId.UTF8String);
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 727044698c8f3df83c0b6f9b37cc0ec3acba0c98
|
||||
Subproject commit 6156230e6a50c65e4e6495623989689834e8e09a
|
Loading…
x
Reference in New Issue
Block a user