feat: Add video message viewing in to the user bubble in widget (#9642)

This commit is contained in:
Sivin Varghese
2024-06-27 01:51:41 +05:30
committed by GitHub
parent b2de6843f6
commit 8f3234cf4b
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<script setup>
defineProps({
url: { type: String, default: '' },
readableTime: { type: String, default: '' },
});
const emits = defineEmits(['error']);
const onVideoError = () => {
emits('error');
};
</script>
<template>
<div class="block relative max-w-full">
<video
class="w-full max-w-[250px] h-auto"
:src="url"
controls
@error="onVideoError"
/>
<span
class="text-xs absolute text-white dark:text-white right-3 bottom-1 whitespace-nowrap"
>
{{ readableTime }}
</span>
</div>
</template>