-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20915 from wordpress-mobile/issue/93-recorder-lef…
…tovers [Voice To Content] AudioRecorder improvements
- Loading branch information
Showing
6 changed files
with
149 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
WordPress/src/main/java/org/wordpress/android/util/audio/RecordingStrategy.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.wordpress.android.util.audio | ||
|
||
import javax.inject.Qualifier | ||
|
||
@Suppress("MagicNumber") | ||
sealed class RecordingStrategy { | ||
abstract val maxFileSize: Long | ||
abstract val maxDuration: Int | ||
abstract val storeInMemory: Boolean | ||
abstract val recordingFileName: String | ||
|
||
data class VoiceToContentRecordingStrategy( | ||
override val maxFileSize: Long = 1000000L * 25, // 25MB | ||
override val maxDuration: Int = 60 * 5, // 5 minutes | ||
override val recordingFileName: String = "voice_recording.mp4", | ||
override val storeInMemory: Boolean = true | ||
) : RecordingStrategy() | ||
} | ||
|
||
// Declare here your custom annotation for each RecordingStrategy so it can be provided by Dagger | ||
@Qualifier | ||
@Retention(AnnotationRetention.BINARY) | ||
annotation class VoiceToContentStrategy | ||
|
||
|