treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Anythingslider - can't get resumeOnVideoEnd to work

  • I am having trouble getting this function to work on my Anythingslider setup.
    My javascript is as follows, and I have got the core and video scripts loaded aswell.
    $(function(){
    $('#slider1').anythingSlider({
    buildNavigation : false,
    resumeOnVideoEnd : true,
    autoPlay : true
    });
    });


    The whole slider works great except the function that when it gets to a video and I press play, it will pause after 2 seconds and go to the next slide, but I would like it to stay on that slide until finished.

    Can anyone give me a hand?
    I will give a link to look at if it helps.

    Thanks, Mitch
  • Hi Mitch!

    Are you using the latest version of AnythingSlider? And if you are, are you including the video extension?
  • Hi Mottie :)

    Yep, downloaded it yesterday to start implementing so it is the latest version.
    I have called the following js files


    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script&gt;
    <link rel="stylesheet" href="css/anythingslider.css">
    <script type="text/javascript" src="js/jquery.anythingslider.js"></script>
    <script type="text/javascript" src="js/jquery.anythingslider.video.js"></script>


    which all load fine.

    Thanks for your help
  • Hey There,

    I seem to be having the same problem. Same code. Is there any light on this?

    Thank you!
    Greg
  • Hi Jerseygreg!

    Could you please share your initialization code? And are you using swfobject.js with embeded video or iframes?
  • Hi Mottie thx for the response. Here is what I'm calling

    <link rel="stylesheet" type="text/css" href="css/style1.css" />
    <link rel="stylesheet" href="css/anythingslider.css">

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script&gt;
    <script type="text/javascript" src="js/jquery.easing.1.2.js"></script>
    <script src="js/jquery.anythingslider.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jquery.anythingslider.video.js"></script>
    <script src="js/swfobject.js"></script>


    This is the jquerey

    <script type="text/javascript">
    $(function(){
    $('#slider').anythingSlider({
    resumeOnVideoEnd : true,
    }); })

    </script>


    And here is the html

    <div id="img_box">
    <ul id="slider">
    </li>
    <object width="560" height="315">
    <param name="movie" value="http://www.youtube.com/v/-R5h6fmpQD4? version=3&amp;hl=en_US"></param>
    <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
    <embed src="http://www.youtube.com/v/-R5h6fmpQD4?version=3&amp;hl=en_US&quot; type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>
    </object>
    </li>
    <li>
    <object width="420" height="315">
    <param name="movie" value="http://www.youtube.com/v/oo7bnhoyFig?version=3&amp;hl=en_US"></param&gt;
    <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
    <embed src="http://www.youtube.com/v/oo7bnhoyFig?version=3&amp;hl=en_US&quot; type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>
    </object>
    </li>
    <object width="420" height="315">
    <param name="movie" value="http://www.youtube.com/v/rJNfnR_3wLc?version=3&amp;hl=en_US"></param&gt;
    <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
    <embed src="http://www.youtube.com/v/rJNfnR_3wLc?version=3&amp;hl=en_US&quot; type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>
    </object>
    </li>
    </ul>
    </div><!--end of img_box-->
    <div id="video_box">


    thank you. yes I am using swfobject.js with embeded video or iframes. I switched to the embed becasue of the video playing automatically in it's 2nd rotation with the iframe
  • Please refer to this post.
  • ****is it solved yet?helpppppp

  • Hi Szam!

    Could you share the code you are using or a demo?