vueper-slides icon indicating copy to clipboard operation
vueper-slides copied to clipboard

Issue with Video displaying when Images and Videos both are passed

Open asabri97 opened this issue 4 years ago • 1 comments

Hello,

I am using vueper slides to show my slideshow that contains images and videos. I am getting the images and videos from the backend. The images are displayed, the slider fades and autoplays but the video content is not displayed. Can anyone help with this issue?

Thank you in advance.

This is my code:

<template>
  <div>
    <vueper-slides :slide-ratio="310 / 599" autoplay fade :touchable="false">
      <vueper-slide
        :class="'contentDisplaySize'"
        v-for="story in displaySlides"
        :key="story.src"
        :image="story.image ? story.src : undefined"
        :video="story.video ? story.src : undefined"
      />
    </vueper-slides>
  </div>
</template>

<script>
import { VueperSlides, VueperSlide } from "vueperslides";
import "vueperslides/dist/vueperslides.css";

export default {
  name: "storySlider",
  components: { VueperSlides, VueperSlide },
  props: {
    experience: Object,
  },
  computed: {
    displaySlides() {
      return this.experience.story_array.map((story) => {
        const isVideo = story.includes(".mov?") || story.includes(".mp4?");
        const isImage =
          story.includes(".jpg?") ||
          story.includes("jpeg?") ||
          story.includes("png") ||
          story.includes("webp");
        return {
          src: story,
          image: isImage,
          video: isVideo,
        };
      });
    },
  },
};
</script>

No video is displayed Capture

Update: I found the videos are displayed in firefox but I have an issue in Chrome.

asabri97 avatar Jul 25 '21 10:07 asabri97

Accepted video formats from the doc:

[String] webm, mp4, ogv, avi

eyesurewould avatar Sep 13 '21 16:09 eyesurewould