-2
<html>
<body>
<video>
<source src="teste.mp4" type="video/mp4">
</video>
<video>
<source src="teste.mp4" type="video/mp4">
</video>
</body>
</html>
-2
<html>
<body>
<video>
<source src="teste.mp4" type="video/mp4">
</video>
<video>
<source src="teste.mp4" type="video/mp4">
</video>
</body>
</html>
-2
Add an event in javascript, which activates the moment you clicked on one of the videos, and then, inside the event, you use the play() function to play the other video.
+/- thus:
let Videos = document.getElementsByTagName('video');
Videos.onClick(Videos.play());
<html>
<body>
<video>
<source src="teste.mp4" type="video/mp4">
</video>
<video>
<source src="teste.mp4" type="video/mp4">
</video>
</body>
</html>
Browser other questions tagged javascript html html5-video
You are not signed in. Login or sign up in order to post.