I have a GlideJS carousel and need to pause autoplay when video is playing in a slide. The autoplay component has start and stop methods but I can't tell from the documentation how to access component methods.
How do I access these methods?
var glide = new Glide('.glide', {
type: 'carousel',
gap: 0,
autoplay: 6000
}).mount();
function onVideoPlay() {
// doesn't work
glide.stop();
// doesn't work
glide.autoplay.stop();
}
function onVideoStop() {
// doesn't work
glide.start();
// doesn't work
glide.autoplay.start();
}