mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Removing dead code part 3 (#2264)
This commit is contained in:
@@ -21,7 +21,6 @@ import MatrixRustSDK
|
||||
|
||||
class VoiceMessageRecorder: VoiceMessageRecorderProtocol {
|
||||
let audioRecorder: AudioRecorderProtocol
|
||||
private let audioConverter: AudioConverterProtocol
|
||||
private let voiceMessageCache: VoiceMessageCacheProtocol
|
||||
private let mediaPlayerProvider: MediaPlayerProviderProtocol
|
||||
|
||||
@@ -31,7 +30,6 @@ class VoiceMessageRecorder: VoiceMessageRecorderProtocol {
|
||||
}
|
||||
|
||||
private let mp4accMimeType = "audio/m4a"
|
||||
private let waveformSamplesCount = 100
|
||||
|
||||
var isRecording: Bool {
|
||||
audioRecorder.isRecording
|
||||
@@ -53,11 +51,9 @@ class VoiceMessageRecorder: VoiceMessageRecorderProtocol {
|
||||
|
||||
init(audioRecorder: AudioRecorderProtocol = AudioRecorder(),
|
||||
mediaPlayerProvider: MediaPlayerProviderProtocol,
|
||||
audioConverter: AudioConverterProtocol = AudioConverter(),
|
||||
voiceMessageCache: VoiceMessageCacheProtocol = VoiceMessageCache()) {
|
||||
self.audioRecorder = audioRecorder
|
||||
self.mediaPlayerProvider = mediaPlayerProvider
|
||||
self.audioConverter = audioConverter
|
||||
self.voiceMessageCache = voiceMessageCache
|
||||
|
||||
addObservers()
|
||||
|
||||
@@ -18,7 +18,6 @@ import Combine
|
||||
import Foundation
|
||||
|
||||
enum VoiceMessageRecorderError: Error {
|
||||
case genericError
|
||||
case missingRecordingFile
|
||||
case previewNotAvailable
|
||||
case audioRecorderError(AudioRecorderError)
|
||||
@@ -33,11 +32,9 @@ enum VoiceMessageRecorderAction {
|
||||
}
|
||||
|
||||
protocol VoiceMessageRecorderProtocol {
|
||||
var audioRecorder: AudioRecorderProtocol { get }
|
||||
var previewAudioPlayerState: AudioPlayerState? { get }
|
||||
var isRecording: Bool { get }
|
||||
var recordingURL: URL? { get }
|
||||
var recordingDuration: TimeInterval { get }
|
||||
|
||||
var actions: AnyPublisher<VoiceMessageRecorderAction, Never> { get }
|
||||
|
||||
@@ -50,7 +47,6 @@ protocol VoiceMessageRecorderProtocol {
|
||||
func seekPlayback(to progress: Double) async
|
||||
func deleteRecording() async
|
||||
|
||||
func buildRecordingWaveform() async -> Result<[UInt16], VoiceMessageRecorderError>
|
||||
func sendVoiceMessage(inRoom roomProxy: RoomProxyProtocol, audioConverter: AudioConverterProtocol) async -> Result<Void, VoiceMessageRecorderError>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user