diff --git a/frappe-ui b/frappe-ui
index 38728b80..aa44431c 160000
--- a/frappe-ui
+++ b/frappe-ui
@@ -1 +1 @@
-Subproject commit 38728b80aaf0cf0a74b2f10e778363c9308c3a1e
+Subproject commit aa44431c185b1e4563f2ebf6af380c7743d2cd4c
diff --git a/frontend/src/components/AudioBlock.vue b/frontend/src/components/AudioBlock.vue
new file mode 100644
index 00000000..d8904905
--- /dev/null
+++ b/frontend/src/components/AudioBlock.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
{{ formatTime(currentTime) }} / {{ formatTime(duration) }}
+
+
+
+
+
+
+
diff --git a/frontend/src/components/VideoBlock.vue b/frontend/src/components/VideoBlock.vue
new file mode 100644
index 00000000..d9d5a36c
--- /dev/null
+++ b/frontend/src/components/VideoBlock.vue
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+ {{ formatTime(currentTime) }} / {{ formatTime(duration) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/utils/upload.js b/frontend/src/utils/upload.js
index fbe607d1..939c3999 100644
--- a/frontend/src/utils/upload.js
+++ b/frontend/src/utils/upload.js
@@ -1,3 +1,7 @@
+import AudioBlock from '@/components/AudioBlock.vue'
+import VideoBlock from '@/components/VideoBlock.vue'
+import { createApp } from 'vue'
+
export class Upload {
constructor({ data, api, readOnly }) {
this.data = data
@@ -10,19 +14,23 @@ export class Upload {
render() {
this.wrapper = document.createElement('div')
- this.wrapper.innerHTML = this.renderUpload(this.data)
+ this.renderUpload(this.data)
return this.wrapper
}
renderUpload(file) {
if (this.isVideo(file.file_type)) {
- return ``
+ const app = createApp(VideoBlock, {
+ file: file.file_url,
+ })
+ app.mount(this.wrapper)
+ return
} else if (this.isAudio(file.file_type)) {
- return ``
+ const app = createApp(AudioBlock, {
+ file: file.file_url,
+ })
+ app.mount(this.wrapper)
+ return
} else if (file.file_type == 'pdf') {
return `