views:

163

answers:

0

I've run into an issue with a Vimeo player that's been set up for a site I'm working on. I have a friend who implemented the slider. The way it's setup is there is an introductory video embedded from Vimeo on the first slide on the homepage, which only shows up on the homepage. The problem is that when a user clicks on either of the arrows of the slider, the video keeps playing even though you click the pause button on the Vimeo video player.

Is there a way to automatically stop the Vimeo video player when the user clicks on either the left or right arrows of the slider (upon advancement to the next slide)?


Here's the slider code used for the site...

<?php 
$options = get_option( 'sample_theme_options' );

$slide_1_title = $options['sometext11'];
$slide_1_image = $options['sometext12'];
$slide_1_url = $options['sometext13'];
$slide_1_text = $options['sometextarea1'];

$slide_2_title = $options['sometext21'];
$slide_2_image = $options['sometext22'];
$slide_2_url = $options['sometext23'];
$slide_2_text = $options['sometextarea2'];

$slide_3_title = $options['sometext31'];
$slide_3_image = $options['sometext32'];
$slide_3_url = $options['sometext33'];
$slide_3_text = $options['sometextarea3'];

$slide_4_title = $options['sometext41'];
$slide_4_image = $options['sometext42'];
$slide_4_url = $options['sometext43'];
$slide_4_text = $options['sometextarea4'];

$slide_5_title = $options['sometext51'];
$slide_5_image = $options['sometext52'];
$slide_5_url = $options['sometext53'];
$slide_5_text = $options['sometextarea5'];
?>
<div id="newsSlider"> 
<div class="lbutton"> 
  <a href="#" class="previous"></a> 
</div>
<div class="container"> 
  <!--<div class="ltrans"></div> -->
    <ul class="slides"> 

        <?php if (is_home()) { ?><?php if (!empty($slide_1_image)) { ?>
        <li>
     <div class="left1slider">
     <?php if (preg_match ("/\b(?:vimeo)\.com\b/i", $slide_1_image)) { 
     // replace
     $video_vim  = $slide_1_image;
     $vimdomain = array("http://vimeo.com/");
     $blank_text   = array("");
     $vim_id = str_replace($vimdomain, $blank_text, $video_vim);
     ?>
     <object width="648" height="356"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="648" height="356"></embed></object>
     <?php } else { ?>
        <a href="<?php echo $slide_1_url; ?>" rel="bookmark">
        <img src="<?php echo $slide_1_image; ?>" width="648" height="356" alt="thumb" />
        </a>
     <?php } ?>
     </div>
     <div class="left2slider">
     <h4><?php echo $slide_1_title; ?></h4>
     <p>
     <?php print nl2br($slide_1_text); ?>
        <br>
        <a href="<?php echo $slide_1_url; ?>" class="readmore">Read More</a>
    </p>
     </div>
        </li>
        <?php } // END OF SLIDER ?> <?php } // dont show first slider on site except on homepage ?>

        <?php if (!empty($slide_2_image)) { ?>
        <li>
     <div class="left1slider">
     <?php if (preg_match ("/\b(?:vimeo)\.com\b/i", $slide_2_image)) { 
     // replace
     $video_vim  = $slide_2_image;
     $vimdomain = array("http://vimeo.com/");
     $blank_text   = array("");
     $vim_id = str_replace($vimdomain, $blank_text, $video_vim);
     ?>
     <object width="648" height="356"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="648" height="356"></embed></object>
     <?php } else { ?>
        <a href="<?php echo $slide_2_url; ?>" rel="bookmark">
        <img src="<?php echo $slide_2_image; ?>" width="648" height="356" alt="thumb" />
        </a>
     <?php } ?>
     </div>
     <div class="left2slider">
     <h4><?php echo $slide_2_title; ?></h4>
     <p>
     <?php print nl2br($slide_2_text); ?>
        <br>
        <a href="<?php echo $slide_2_url; ?>" class="readmore">View Event Details</a>
    </p>
     </div>
        </li>
        <?php } // END OF SLIDER ?>

        <?php if (!empty($slide_3_image)) { ?>
        <li>
     <div class="left1slider">
     <?php if (preg_match ("/\b(?:vimeo)\.com\b/i", $slide_3_image)) { 
     // replace
     $video_vim  = $slide_3_image;
     $vimdomain = array("http://vimeo.com/");
     $blank_text   = array("");
     $vim_id = str_replace($vimdomain, $blank_text, $video_vim);
     ?>
     <object width="648" height="356"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="648" height="356"></embed></object>
     <?php } else { ?>
        <a href="<?php echo $slide_3_url; ?>" rel="bookmark">
        <img src="<?php echo $slide_3_image; ?>" width="648" height="356" alt="thumb" />
        </a>
     <?php } ?>
     </div>
     <div class="left2slider">
     <h4><?php echo $slide_3_title; ?></h4>
     <p>
     <?php print nl2br($slide_3_text); ?>
        <br>
        <a href="<?php echo $slide_3_url; ?>" class="readmore">Find out about 50/50</a>
    </p>
     </div>
        </li>
        <?php } // END OF SLIDER ?>

        <?php if (!empty($slide_4_image)) { ?>
        <li>
     <div class="left1slider">
     <?php if (preg_match ("/\b(?:vimeo)\.com\b/i", $slide_4_image)) { 
     // replace
     $video_vim  = $slide_4_image;
     $vimdomain = array("http://vimeo.com/");
     $blank_text   = array("");
     $vim_id = str_replace($vimdomain, $blank_text, $video_vim);
     ?>
     <object width="648" height="356"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="648" height="356"></embed></object>
     <?php } else { ?>
        <a href="<?php echo $slide_4_url; ?>" rel="bookmark">
        <img src="<?php echo $slide_4_image; ?>" width="648" height="356" alt="thumb" />
        </a>
     <?php } ?>
     </div>
     <div class="left2slider">
     <h4><?php echo $slide_4_title; ?></h4>
     <p>
     <?php print nl2br($slide_4_text); ?>
        <br>
        <a href="<?php echo $slide_4_url; ?>" class="readmore">Read More</a>
    </p>
     </div>
        </li>
        <?php } // END OF SLIDER ?>

        <?php if (!empty($slide_5_image)) { ?>
        <li>
     <div class="left1slider">
     <?php if (preg_match ("/\b(?:vimeo)\.com\b/i", $slide_5_image)) { 
     // replace
     $video_vim  = $slide_5_image;
     $vimdomain = array("http://vimeo.com/");
     $blank_text   = array("");
     $vim_id = str_replace($vimdomain, $blank_text, $video_vim);
     ?>
     <object width="648" height="356"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=&lt;?php echo $vim_id; ?>&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=0&amp;autoplay=1&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="648" height="356"></embed></object>
     <?php } else { ?>
        <a href="<?php echo $slide_5_url; ?>" rel="bookmark">
        <img src="<?php echo $slide_5_image; ?>" width="648" height="356" alt="thumb" />
        </a>
     <?php } ?>
     </div>
     <div class="left2slider">
     <h4><?php echo $slide_5_title; ?></h4>
     <p>
     <?php print nl2br($slide_5_text); ?>
        <br>
        <a href="<?php echo $slide_5_url; ?>" class="readmore">Read More</a>
    </p>
     </div>
        </li>
        <?php } // END OF SLIDER ?>

Thank you for your help!