mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
fix(build): 🚑 revert media player to html one
This commit is contained in:
parent
53fddfeb30
commit
d472d9f24c
|
|
@ -5,9 +5,8 @@
|
||||||
<img :src="attachment.url" :alt="attachment.description ?? undefined"
|
<img :src="attachment.url" :alt="attachment.description ?? undefined"
|
||||||
class="w-full h-full object-contain bg-muted/20" />
|
class="w-full h-full object-contain bg-muted/20" />
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<video-player v-else-if="attachment.type === 'video' || attachment.type === 'gifv'"
|
<video v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" :src="attachment.url"
|
||||||
:alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20"
|
:alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20" controls />
|
||||||
src="attachment.url" controls :volume="0.6" />
|
|
||||||
<audio v-else-if="attachment.type === 'audio'" :src="attachment.url"
|
<audio v-else-if="attachment.type === 'audio'" :src="attachment.url"
|
||||||
:alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20" controls />
|
:alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20" controls />
|
||||||
<DialogTrigger v-else :as-child="true">
|
<DialogTrigger v-else :as-child="true">
|
||||||
|
|
@ -47,9 +46,8 @@
|
||||||
<div class="flex items-center justify-center overflow-hidden *:max-h-[80vh] *:max-w-[80vw]">
|
<div class="flex items-center justify-center overflow-hidden *:max-h-[80vh] *:max-w-[80vw]">
|
||||||
<img v-if="attachment.type === 'image'" :src="attachment.url" :alt="attachment.description ?? ''"
|
<img v-if="attachment.type === 'image'" :src="attachment.url" :alt="attachment.description ?? ''"
|
||||||
class="object-contain" />
|
class="object-contain" />
|
||||||
<video-player v-else-if="attachment.type === 'video' || attachment.type === 'gifv'"
|
<video v-else-if="attachment.type === 'video' || attachment.type === 'gifv'" :src="attachment.url"
|
||||||
:alt="attachment.description ?? undefined" class="w-full h-full object-cover bg-muted/20"
|
:alt="attachment.description ?? ''" class="object-cover" controls />
|
||||||
src="attachment.url" controls :volume="0.6" />
|
|
||||||
<audio v-else-if="attachment.type === 'audio'" :src="attachment.url" :alt="attachment.description ?? ''"
|
<audio v-else-if="attachment.type === 'audio'" :src="attachment.url" :alt="attachment.description ?? ''"
|
||||||
class="object-cover" controls />
|
class="object-cover" controls />
|
||||||
<div v-else class="flex flex-col items-center justify-center">
|
<div v-else class="flex flex-col items-center justify-center">
|
||||||
|
|
@ -80,8 +78,6 @@ import {
|
||||||
DialogTrigger,
|
DialogTrigger,
|
||||||
} from "../ui/dialog";
|
} from "../ui/dialog";
|
||||||
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
|
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
|
||||||
import { VideoPlayer } from '@videojs-player/vue'
|
|
||||||
import 'video.js/dist/video-js.css'
|
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
attachment: Attachment;
|
attachment: Attachment;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue