Add the last sequence number in the paused/stopped state event

This commit is contained in:
Philippe Loriaux
2022-12-02 16:26:21 +01:00
parent 65d56edaf1
commit b1c18b2792
5 changed files with 45 additions and 13 deletions
@@ -91,7 +91,8 @@ class VoiceBroadcastRecorderService: VoiceBroadcastRecorderServiceProtocol {
UIApplication.shared.isIdleTimerDisabled = false
invalidateTimer()
voiceBroadcastService?.stopVoiceBroadcast(success: { [weak self] _ in
voiceBroadcastService?.stopVoiceBroadcast(lastChunkSequence: chunkFileNumber,
success: { [weak self] _ in
MXLog.debug("[VoiceBroadcastRecorderService] Stopped")
guard let self = self else { return }
@@ -121,7 +122,8 @@ class VoiceBroadcastRecorderService: VoiceBroadcastRecorderServiceProtocol {
UIApplication.shared.isIdleTimerDisabled = false
invalidateTimer()
voiceBroadcastService?.pauseVoiceBroadcast(success: { [weak self] _ in
voiceBroadcastService?.pauseVoiceBroadcast(lastChunkSequence: chunkFileNumber,
success: { [weak self] _ in
guard let self = self else { return }
// Send current chunk