+ 1

Command video with JavaScript

Actually i want to make "command video"( it means when user click the particular button then play the one video which I want to play ) As I made 5 different buttons with 5 different videos along "onclick function" But here is one problem is created that is this problem::(whenever I want to play another video then I just click the second button, second video is play but previous video is also playing simultaneously!) I want to make like this :: When i click the first button first video play, When i click the second button then second video is play and first video paused and so on.. Please tell me how can made this !!! This is my code:: https://code.sololearn.com/W8nZ4wXwkCsI/?ref=app

5th Sep 2019, 7:53 AM
Shah Rabbani
Shah Rabbani - avatar
2 Réponses
+ 1
can you please also attach your code ??
5th Sep 2019, 3:01 PM
Gurvinder Singh Maanak
Gurvinder Singh Maanak - avatar
+ 1
Ok ! I will provide.
7th Sep 2019, 5:08 AM
Shah Rabbani
Shah Rabbani - avatar