• Resolved snippet24

    (@snippet24)


    I’m trying to stop the slider from autoplay/slide when a youtube video inside a slide is playing. But first to do that I need to control/pause autoplay and then apply youtube api I suppose.
    Tried with this

    $('.carousel').carousel({
            pause: true,
            interval: false
        });
    • This topic was modified 4 years, 10 months ago by snippet24.
    • This topic was modified 4 years, 10 months ago by snippet24.
    • This topic was modified 4 years, 10 months ago by snippet24.
    • This topic was modified 4 years, 10 months ago by snippet24.
Viewing 1 replies (of 1 total)
  • Plugin Author Phil Ewels

    (@tallphil)

    Hi @snippet24,

    You should be able to use the native Bootstrap javascript functions to do this. I would use one of the Bootstrap event listeners to trigger some code each time the slide moves. You could then inspect the active slide (which will have an .active class) and see if it contains a YouTube video code. If so you can then pause the carousel and call whatever YouTube javascript functions you need to autoplay the video.

    Good luck!

    Phil

Viewing 1 replies (of 1 total)
  • The topic ‘How to override settings for the carousel via javascript’ is closed to new replies.