I am creating a Carousel to show some videos including audio, however when navigating the carousel using the arrows the video and audio continue playing. I dont know if an event listener would be best or if there is a React Player component I can use? Here is my code
return <div className="App">
<Carousel>
{videoProperties.map ((videoObject) => {
return (
<Carousel.Item key={videoObject.id}>
<ReactPlayer
url={videoObject.src}
width="100%"
pip= {true}
controls={true}
playing={false}
/>
<Carousel.Caption>
<h3>{videoObject.title}</h3>
<p>{videoObject.credit}</p>
</Carousel.Caption>
</Carousel.Item>
)
})}
</Carousel>
</div>;
};
export default VideoCarousel;