Play video iframe with reactjs

enter image description hereThere is an issue. I have a slider which contains 2 images and 1 video, I embedded video in an iframe. The question is how can I hide 2 buttons (next and prev) of slider when I play video and show back when video is paused.


You should use this component wich has built-in onPlay and onStop functions that would allow you to display or not the arrows from the slider.

You can achieve this by using a state for the arrow attribute wich would be set to false when the video is playing and to true when it’s not.

Here is an exemple:

    url='yourvideourl' />

Note: handlePlay() should set the state of your arrow state variable to true and handlePause() to false.