From 0a5c42cb113a76d0f6f9fa69e2ba0cebfc0b8e6c Mon Sep 17 00:00:00 2001 From: Salem Yaslem Date: Fri, 21 Jul 2023 20:23:33 +0300 Subject: [PATCH] support play videos --- app.vue | 10 +++++---- components/media/video-player.vue | 7 +++++-- composables/worker/7zip-manager.ts | 31 +++++++--------------------- package-lock.json | 33 +++++++----------------------- package.json | 4 ++-- 5 files changed, 27 insertions(+), 58 deletions(-) diff --git a/app.vue b/app.vue index 0a4b3e8..4623ee5 100644 --- a/app.vue +++ b/app.vue @@ -18,6 +18,7 @@ let selectedList = ref([]); let filesManager = new FilesManager(filesList); let history = new HistoryManager(filesManager); +const videoExtensions = ['mp4', 'avi', 'mov', 'mkv']; let mediaBlobUrl = ref(''); watchEffect(async () => { @@ -65,9 +66,10 @@ watchEffect(async () => { } // Experimental feature - // if(['mp4', 'avi', 'mov', 'mkv'].includes(filesManager.getFile(selectedPath.value)?.extension?.toLowerCase())) { - // mediaBlobUrl.value = await filesManager.getFileBlobUrl(selectedPath.value) as string; - // } + if(videoExtensions.includes(filesManager.getFile(selectedPath.value)?.extension?.toLowerCase())) { + mediaBlobUrl.value = await filesManager.getFileBlobUrl(selectedPath.value) as string; + console.log(mediaBlobUrl.value) + } }) const dragContainer = document.querySelector(".select-area"); @@ -168,7 +170,7 @@ function stepUp(path: string) { -