Fixed conference recording file name, using subject if available
This commit is contained in:
parent
3c0dc61828
commit
ecc94161ee
2 changed files with 6 additions and 3 deletions
|
@ -250,7 +250,7 @@ class ConferenceViewModel : ViewModel() {
|
|||
Log.i("[Conference] Stopping conference recording")
|
||||
conference.value?.stopRecording()
|
||||
} else {
|
||||
val path = LinphoneUtils.getRecordingFilePathForConference()
|
||||
val path = LinphoneUtils.getRecordingFilePathForConference(conference.value?.currentParams?.subject)
|
||||
Log.i("[Conference] Starting recording in file $path")
|
||||
conference.value?.startRecording(path)
|
||||
}
|
||||
|
|
|
@ -137,12 +137,15 @@ class LinphoneUtils {
|
|||
return FileUtils.getFileStoragePath(fileName).absolutePath
|
||||
}
|
||||
|
||||
fun getRecordingFilePathForConference(): String {
|
||||
fun getRecordingFilePathForConference(subject: String?): String {
|
||||
val dateFormat: DateFormat = SimpleDateFormat(
|
||||
RECORDING_DATE_PATTERN,
|
||||
Locale.getDefault()
|
||||
)
|
||||
val fileName = "conference_${dateFormat.format(Date())}.mkv"
|
||||
val fileName = if (subject.isNullOrEmpty())
|
||||
"conference_${dateFormat.format(Date())}.mkv"
|
||||
else
|
||||
"${subject}_${dateFormat.format(Date())}.mkv"
|
||||
return FileUtils.getFileStoragePath(fileName).absolutePath
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue