Help with adding an html5 player feature

I’m using this html5 vid player script (www.video-js.com) on a web page, with more than one video player side by side, like this:

<div class="col-a1">
<video id="video1" class="video-js vjs-default-skin" preload="auto" width="200" height="200"
controls poster="/1video/video1.jpg" data-setup='{}'>
<source src="/1video/video1.mp4" type='video/mp4' />
</video>
</div>

<div class="col-a2">
<video id="video2" class="video-js vjs-default-skin" controls preload="auto" width="200" height="200"
poster="/1video/video2.jpg"
data-setup='{}'>
<source src="/1video/video2.mp4" type='video/mp4' />
</vid>
   </div>

   <div class="col-a3">
<video id="video3" class="video-js vjs-default-skin" controls preload="auto" width="200" height="200"
poster="/1video/video3.jpg"
data-setup='{}'>
<source src="/1video/video3.mp4" type='video/mp4' />
</vid>
   </div>

Currently, you can play all players at the same time. I’d like help adding the feature that only one player can play at a time. If one is playing, and another ‘play’ button is selected, the playing player pauses.

Any help/ideas with that will be appreciated.

The best idea here seems to be to loop through all of the available video sections, pause each of them, then go to the one that was initially selected and play that one.

Thanks for your reply. Can you explain how’d I’d do that?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.