mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-25 04:15:31 +00:00
android, desktop: local video encryption (#3678)
* android, desktop: local video encryption * refactor * different look of progress indicator --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
46fe0fc671
commit
be0c791c43
+4
-4
@@ -33,9 +33,9 @@ actual class VideoPlayer actual constructor(
|
||||
override val duration: MutableState<Long> = mutableStateOf(defaultDuration)
|
||||
override val preview: MutableState<ImageBitmap> = mutableStateOf(defaultPreview)
|
||||
|
||||
init {
|
||||
setPreviewAndDuration()
|
||||
}
|
||||
|
||||
// Currently unused because we use low-quality preview
|
||||
// init { setPreviewAndDuration() }
|
||||
|
||||
val player = ExoPlayer.Builder(androidAppContext,
|
||||
DefaultRenderersFactory(androidAppContext))
|
||||
@@ -69,7 +69,7 @@ actual class VideoPlayer actual constructor(
|
||||
}
|
||||
|
||||
private fun start(seek: Long? = null, onProgressUpdate: (position: Long?, state: TrackState) -> Unit): Boolean {
|
||||
val filepath = getAppFilePath(uri)
|
||||
val filepath = if (uri.scheme == "file") uri.toFile().absolutePath else getAppFilePath(uri)
|
||||
if (filepath == null || !File(filepath).exists()) {
|
||||
Log.e(TAG, "No such file: $filepath")
|
||||
brokenVideo.value = true
|
||||
|
||||
Reference in New Issue
Block a user