mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Add voice message recording duration indicator and limit (#1628)
--------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
+3
-1
@@ -17,6 +17,7 @@
|
||||
package io.element.android.libraries.voicerecorder.api
|
||||
|
||||
import java.io.File
|
||||
import kotlin.time.Duration
|
||||
|
||||
sealed class VoiceRecorderState {
|
||||
/**
|
||||
@@ -27,9 +28,10 @@ sealed class VoiceRecorderState {
|
||||
/**
|
||||
* The recorder is currently recording.
|
||||
*
|
||||
* @property elapsedTime The elapsed time since the recording started.
|
||||
* @property level The current audio level of the recording as a fraction of 1.
|
||||
*/
|
||||
data class Recording(val level: Double) : VoiceRecorderState()
|
||||
data class Recording(val elapsedTime: Duration, val level: Double) : VoiceRecorderState()
|
||||
|
||||
/**
|
||||
* The recorder has finished recording.
|
||||
|
||||
Reference in New Issue
Block a user