Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Video displaying when Images and Videos both are passed #152

Open
asabri97 opened this issue Jul 25, 2021 · 1 comment
Open

Comments

@asabri97
Copy link

asabri97 commented Jul 25, 2021

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.

@eyesurewould
Copy link

Accepted video formats from the doc:

[String] webm, mp4, ogv, avi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants