I use nuka-carrousel package in React to make a displaying of video content for the while everything is fine i display videos using html ... . I have set the parameters to autoplay but the video is still playing when i slide to another one what i would like to achieve is to pause the video i played after a slide event. I've read the nuka carrousel documentation and find this
"afterSlide (index: number) => void Hook to be called after a slide is changed. default:() => {}.
I have put afterSlide in : ... . What i constat is that now in console log it detect the number of slide but as there is no parameters set up it send me back an error "carousel.js:78 Uncaught TypeError: afterSlide is not a function".
What i would like to know is how to use afterSlide to parameters an event or change a status of an element that could lead me to pause the video after each slide ?
I would appreciate if anyone could give a full response or event an hint on how to achieve that. Thank you in advance