Skip to content

Commit 7513a6c

Browse files
committed
feat: enhance video rendering in markdown by adding controls and a caption
1 parent dfd7594 commit 7513a6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom/MarkdownEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ function markdownForUploadedFile(file: File, url: string): string {
425425
426426
if (file.type?.startsWith('video/')) {
427427
const mediaType = file.type || 'video/mp4';
428-
return `<video width="400">\n<!-- For gif-like videos use: <video width="400" autoplay loop muted playsinline> -->\n <source src="${url}" type="${mediaType}">\n</video>`;
428+
return `<figure>\n <!-- For gif-like videos use: <video width="500" autoplay loop muted playsinline> -->\n <video width="500" controls>\n <source src="${url}" type="${mediaType}">\n </video>\n <figcaption>Demo</figcaption>\n</figure>`;
429429
}
430430
431431
// alert that file cant be uploaded

0 commit comments

Comments
 (0)