diff --git a/src/components/Card.vue b/src/components/Card.vue index f5b57c8..e9cf206 100644 --- a/src/components/Card.vue +++ b/src/components/Card.vue @@ -19,10 +19,10 @@ const media = computed(() => { return props.post.media[0] }) -const videoElement = ref(null) -const videoIsVisible = useElementVisibility(videoElement) +const mediaElement = ref(null) +const mediaIsVisible = useElementVisibility(mediaElement) const playVideo = computed(() => { - return media.value?.type === "video" && props.config.playVideos && videoIsVisible.value + return media.value?.type === "video" && props.config.playVideos && mediaIsVisible.value }) const onMediaLoad = inject('fixLayout', () => undefined) @@ -43,9 +43,9 @@ const onMediaLoad = inject('fixLayout', () => undefined)
-
+
-