mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 19:34:25 +02:00
Handle VoIP buttons when VB is used (#7225)
This commit is contained in:
+4
@@ -68,6 +68,10 @@ final class VoiceBroadcastRecorderCoordinator: Coordinator, Presentable {
|
||||
func pauseRecording() {
|
||||
voiceBroadcastRecorderViewModel.context.send(viewAction: .pause)
|
||||
}
|
||||
|
||||
func isVoiceBroadcastRecording() -> Bool {
|
||||
return voiceBroadcastRecorderService.isRecording
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
}
|
||||
|
||||
+8
@@ -85,6 +85,14 @@ import Foundation
|
||||
voiceBroadcastRecorderCoordinatorForCurrentEvent()?.pauseRecording()
|
||||
}
|
||||
|
||||
@objc public func isVoiceBroadcastRecording() -> Bool {
|
||||
guard let coordinator = voiceBroadcastRecorderCoordinatorForCurrentEvent() else {
|
||||
return false
|
||||
}
|
||||
|
||||
return coordinator.isVoiceBroadcastRecording()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
/// Retrieve the voiceBroadcast recorder coordinator for the current event or nil if it hasn't been created yet
|
||||
|
||||
+3
@@ -44,6 +44,9 @@ class VoiceBroadcastRecorderService: VoiceBroadcastRecorderServiceProtocol {
|
||||
// MARK: Public
|
||||
|
||||
weak var serviceDelegate: VoiceBroadcastRecorderServiceDelegate?
|
||||
var isRecording: Bool {
|
||||
return audioEngine.isRunning
|
||||
}
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
|
||||
+3
@@ -25,6 +25,9 @@ protocol VoiceBroadcastRecorderServiceProtocol {
|
||||
/// Service delegate
|
||||
var serviceDelegate: VoiceBroadcastRecorderServiceDelegate? { get set }
|
||||
|
||||
/// Returns if a voice broadcast is currently recording.
|
||||
var isRecording: Bool { get }
|
||||
|
||||
/// Start voice broadcast recording.
|
||||
func startRecordingVoiceBroadcast()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user