OwlCarousel Youtube video not showing

I have a YouTube video that I want to show, but it doesn't display at all. I did not add height or width to the video because I want to keep it responsive.

http://www.owlcarousel.owlgraphic.com/demos/video.html

<div id="carousel" class="owl-carousel">
  <div>
    <a class="owl-video" href="https://www.youtube.com/watch?v=Oy9GFAQ4x4w"></a>
  </div>
  <div><img src="http://cdn.playbuzz.com/cdn/7a7a5814-ed79-410c-b748-db6a24f73f0b/4d71c010-f930-4334-ba62-79d87a7ddef4.jpg"></div>

</div>

http://jsfiddle.net/nLz17fcv/12/

+4
source share
1 answer

Adding a video using a tag aIt seems like it is not working.

<div>
    <a class="owl-video" href="https://www.youtube.com/watch?v=Oy9GFAQ4x4w"></a>
</div>

Instead, you can replace it with Iframeto insert the desired video.

<div class="item-video">
   <iframe width="420" height="315" src="https://www.youtube.com/embed/Oy9GFAQ4x4w">
   </iframe>
</div>

In addition to this, I deleted transitionStyle: "fade"it because this property blocks the carousel transition.

You can check it out on DEMO

,

+4

Source: https://habr.com/ru/post/1624528/


All Articles