From 43323e92d5d69083c2bc16d0114dc43d570a134d Mon Sep 17 00:00:00 2001 From: sowjanyakch Date: Tue, 17 Dec 2024 18:52:26 +0100 Subject: [PATCH] open .webm video files with internal player Signed-off-by: sowjanyakch --- .../main/java/com/nextcloud/talk/utils/FileViewerUtils.kt | 5 ++++- app/src/main/java/com/nextcloud/talk/utils/Mimetype.kt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/utils/FileViewerUtils.kt b/app/src/main/java/com/nextcloud/talk/utils/FileViewerUtils.kt index fac47d5c6a..c7630f6ec4 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/FileViewerUtils.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/FileViewerUtils.kt @@ -42,6 +42,7 @@ import com.nextcloud.talk.utils.Mimetype.TEXT_PLAIN import com.nextcloud.talk.utils.Mimetype.VIDEO_MP4 import com.nextcloud.talk.utils.Mimetype.VIDEO_OGG import com.nextcloud.talk.utils.Mimetype.VIDEO_QUICKTIME +import com.nextcloud.talk.utils.Mimetype.VIDEO_WEBM import com.nextcloud.talk.utils.MimetypeUtils.isAudioOnly import com.nextcloud.talk.utils.MimetypeUtils.isGif import com.nextcloud.talk.utils.MimetypeUtils.isMarkdown @@ -148,7 +149,8 @@ class FileViewerUtils(private val context: Context, private val user: User) { AUDIO_OGG, VIDEO_MP4, VIDEO_QUICKTIME, - VIDEO_OGG + VIDEO_OGG, + VIDEO_WEBM -> openMediaView(filename, mimetype) IMAGE_PNG, IMAGE_JPEG, @@ -252,6 +254,7 @@ class FileViewerUtils(private val context: Context, private val user: User) { VIDEO_MP4, VIDEO_QUICKTIME, VIDEO_OGG, + VIDEO_WEBM, TEXT_MARKDOWN, TEXT_PLAIN -> true else -> false diff --git a/app/src/main/java/com/nextcloud/talk/utils/Mimetype.kt b/app/src/main/java/com/nextcloud/talk/utils/Mimetype.kt index 9778e35a5d..ad2cdc130d 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/Mimetype.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/Mimetype.kt @@ -26,6 +26,7 @@ object Mimetype { const val VIDEO_MP4 = "video/mp4" const val VIDEO_QUICKTIME = "video/quicktime" const val VIDEO_OGG = "video/ogg" + const val VIDEO_WEBM = "video/webm" const val TEXT_MARKDOWN = "text/markdown" const val TEXT_PLAIN = "text/plain"