library / dev.bmcreations.scrcast.config / StorageConfig
StorageConfig¶
data class StorageConfig :Parcelable
An immutable data class representing configuration options for the storage of the output file.
Constructors¶
| Name | Summary |
|---|---|
| <init> | An immutable data class representing configuration options for the storage of the output file.StorageConfig(directoryName:String= "scrcast", directory:File= Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES), fileNameFormatter:FileFormatter= { SimpleDateFormat("MM_dd_yyyy_hhmmss", Locale.getDefault()).format(Date()) }, outputFormat:Int= MediaRecorder.OutputFormat.MPEG_4, maxSizeMB:Float= 0f) |
Properties¶
| Name | Summary |
|---|---|
| directory | The parent directory for all storage operations Will end up being located at mediaStorageLocation/fileNameFormatterval directory:File |
| directoryName | The directory name for this recording to be stored in. Will end up being located at mediaStorageLocation/fileNameFormatterval directoryName:String |
| fileNameFormatter | the formatting of the file name for the resulting screen recording. This is done via a higher order lambda in Kotlin and a FunctionN to ensure the formatter will run for each recording independently of one another.val fileNameFormatter:FileFormatter |
| maxSizeMB | Defines the maximum size (in MB) desired for the recording. If the recording session hits this defined size limit, the recording will auto end.val maxSizeMB:Float |
| mediaStorageLocation | The resulting directory location of the screen recordings, derived from directory and directoryNameval mediaStorageLocation:File? |
| outputFormat | The resulting video format of the screen recording file.val outputFormat:Int |