open .webm video files with internal player

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2024-12-17 18:52:26 +01:00 committed by Marcel Hibbe
parent 91b6e9caf4
commit 9d76a1e7ed
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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"