diff --git a/layers/components/atoms/Video.vue b/layers/components/atoms/Video.vue index 2cb8111..c0785b4 100644 --- a/layers/components/atoms/Video.vue +++ b/layers/components/atoms/Video.vue @@ -4,7 +4,6 @@ interface Props { type?: 'mp4' | 'webm' poster?: string play?: boolean - muted?: boolean loop?: boolean bordered?: boolean class?: string @@ -13,7 +12,6 @@ interface Props { const props = withDefaults(defineProps(), { type: 'mp4', play: true, - muted: true, loop: true, bordered: true, }) @@ -98,9 +96,10 @@ watch( ) onMounted(() => { - nextTick(() => { + nextTick(async () => { if (props.play) { - playVideo() + await waitForCanPlay() + await playVideo() } }) }) @@ -118,8 +117,8 @@ onBeforeUnmount(() => {