|
5 | 5 | <img :src="attachment.url" :alt="attachment.description ?? undefined"
|
6 | 6 | class="w-full h-full object-contain bg-muted/20" />
|
7 | 7 | </DialogTrigger>
|
8 |
| - <video-player v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" |
9 |
| - :alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20" |
10 |
| - src="attachment.url" controls :volume="0.6" /> |
| 8 | + <video v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" :src="attachment.url" |
| 9 | + :alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20" controls /> |
11 | 10 | <audio v-else-if="attachment.type === 'audio'" :src="attachment.url"
|
12 | 11 | :alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20" controls />
|
13 | 12 | <DialogTrigger v-else :as-child="true">
|
|
47 | 46 | <div class="flex items-center justify-center overflow-hidden *:max-h-[80vh] *:max-w-[80vw]">
|
48 | 47 | <img v-if="attachment.type === 'image'" :src="attachment.url" :alt="attachment.description ?? ''"
|
49 | 48 | class="object-contain" />
|
50 |
| - <video-player v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" |
51 |
| - :alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20" |
52 |
| - src="attachment.url" controls :volume="0.6" /> |
| 49 | + <video v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" :src="attachment.url" |
| 50 | + :alt="attachment.description ?? ''" class="object-cover" controls /> |
53 | 51 | <audio v-else-if="attachment.type === 'audio'" :src="attachment.url" :alt="attachment.description ?? ''"
|
54 | 52 | class="object-cover" controls />
|
55 | 53 | <div v-else class="flex flex-col items-center justify-center">
|
@@ -80,8 +78,6 @@ import {
|
80 | 78 | DialogTrigger,
|
81 | 79 | } from "../ui/dialog";
|
82 | 80 | import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
|
83 |
| -import { VideoPlayer } from '@videojs-player/vue' |
84 |
| -import 'video.js/dist/video-js.css' |
85 | 81 |
|
86 | 82 | defineProps<{
|
87 | 83 | attachment: Attachment;
|
|
0 commit comments