Tabatha Jones Wrisley
Tabatha Jones Wrisley

Reputation: 31

jssor Slider add Video

I would like to add a video inside my current image slider. I don't want only video to play but a mix of video and images. I've been able to get the video to play but I need to add the pause, play and stop controllers as well as make that slide last longer than the other slides. Can anyone please help me?

http://www.piratesdinneradventureca.com/

<!-- Insert Slideshow -->

<div id="slideshowwrapper">
  <div id="slider1_container" style="left: 0px; top: 5px; width: 687px; height: 324px; overflow: visible; position: relative;">

    <!-- Slides Container -->

    <div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 687px; height: 324px; overflow: hidden;">
<div><a u="image" href="http://www.piratesdinneradventureca.com/special-offers/"><img src="<?php echo get_template_directory_uri(); ?>/images/Halloween-show.png" /></a></div>
<div><a u="image" href="http://www.piratesdinneradventureca.com/special-offers/"><img src="<?php echo get_template_directory_uri(); ?>/images/After-Summer.png" /></a></div>
<div><video style="width="687px" height="324px" autoplay>
    <source src="<?php echo get_template_directory_uri(); ?>/images/PiratesSeaDragon_converted.mp4" type="video/mp4" />
    <source src="<?php echo get_template_directory_uri(); ?>/images/PiratesSeaDragon.ogv" type="video/ogg" pHideControls="0" />
</video></div>

Upvotes: 0

Views: 4665

Answers (2)

jssor
jssor

Reputation: 6985

Jssor Slider supports youtube video.

<script type="text/javascript" src="../js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../js/jssor.slider.mini.js"></script>
<script type="text/javascript" src="../js/jssor.player.ytiframe.min.js"></script>

You can put a video player in any slide in following format:

<div>
 <div u="player" style="position: relative; top: 0px; left: 0px; width: 640px; height: 390px; overflow: hidden;">
   <!-- iframe in ebay page is not allowed, youtube iframe video is not supported for ebay listing -->
   <iframe pHandler="ytiframe" pHideControls="0" width="640" height="390" style="z-index: 0;" src="http://www.youtube.com/embed/H7jtC8vjXw8?enablejsapi=1&version=3&playerapiid=ytplayer&fs=1&wmode=transparent" frameborder="0" scrolling="no"></iframe>
   <!-- play cover begin (optional, can remove play cover) -->
   <div u="cover" class="videoCover" style="position: absolute; top: 0px; left: 0px; background-color: #000; background-image: url(../img/play.png); background-position: center center; background-repeat: no-repeat; filter: alpha(opacity=40); opacity: .4; cursor: pointer; display: none; z-index: 1;"></div>
   <!-- play cover end -->
   <!-- close button begin (optional, can remove close button) -->
   <style>
      .closeButton { background-image: url(../img/close.png); }
      .closeButton:hover { background-position: -30px 0px; }
   </style>
   <div u="close" class="closeButton" style="position: absolute; top: 0px; right: 1px; width: 30px; height: 30px; background-color: #000; cursor: pointer; display: none; z-index: 2;"></div>
   <!-- close button end -->
 </div>
</div>

Upvotes: 1

Vano42
Vano42

Reputation: 1

and add

//fetch and initialize youtube players
$JssorPlayer$.$FetchPlayers(document.body);

Upvotes: 0

Related Questions