troubleshooting Question

Need help with Video in Slide Show.

Avatar of Melody Scott
Melody ScottFlag for United States of America asked on
Web DevelopmentHTMLJavaScriptjQuery
2 Comments1 Solution110 ViewsLast Modified:

user name: expertexchange
password:  BobTheBuilder45!!

The video in the first slide is almost working, thanks to an expert on here.  The last slide does transition, to the video, and then on through the slides. On initial page load, the video plays to the end, then stops, and if I hit the data-slide, it goes through the rest of the slides. But we want 1. The video plays to the end unless someone advances to next slide, then it stops. 2. The slide show should transition through, then skip the video after the video has played.

The expert says: The problem is that the slide transition event fires even when the carousel is paused.

What needs to happen is that you need to maintain a state variable that determines whether or not you have paused.

When the event fires you check this - if it is set then you e.preventDefault() the event - otherwise you let it through.

You then have to listen for the stop event on the video so you can set that state variable to false - otherwise the transition will not continue.

There is another caveat to this - if the user clicks to the next slide - then we need to cater for that - in other words stop the video and allow the transition.

Anyone care to have a go at this? I am in way over my head. Thanks!
Melody Scott

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros