I'm having an issue with customizing a video player in HTML5. When I press play on the top video, it automatically plays both videos on the page simultaneously.
For reference, here is my code on jsfiddle: http://jsfiddle.net/BannerBomb/U4MZ3/27/
Below is a snippet of my HTML:
<!--Video 1-->
<section id="wrapper">
<div class="videoContainer">
<video id="myVideo" controls preload="auto" poster="http://s.cdpn.io/6035/vp_poster.jpg" width="380" >
<source src="http://html-testing.github.io/2/videos/mikethefrog.mp4" type="video/mp4" />
<p>Your browser does not support the video tag.</p>
</video>
<div class="caption">Video1</div>
<div class="control">
<div class="btmControl">
<div class="btnPlay btn" title="Play/Pause video"><span class="icon-play"></span></div>
<div class="progress-bar">
<div class="progress">
<span class="bufferBar"></span>
<span class="timeBar"></span>
</div>
</div>
<div class="sound sound2 btn" title="Mute/Unmute sound"><span class="icon-sound"></span></div>
<div class="btnFS btn" title="Switch to full screen"><span class="icon-fullscreen"></span></div>
</div>
</div>
</div>
</section>
<!--Video 2-->
<section id="wrapper">
<div class="videoContainer">
<video id="myVideo" controls preload="auto" poster="http://s.cdpn.io/6035/vp_poster.jpg" width="380" >
<source src="http://html-testing.github.io/2/videos/mikethefrog.mp4" type="video/mp4" />
<p>Your browser does not support the video tag.</p>
</video>
<div class="caption">Video2</div>
<div class="control">
<div class="btmControl">
<div class="btnPlay btn" title="Play/Pause video"><span class="icon-play"></span></div>
<div class="progress-bar">
<div class="progress">
<span class="bufferBar""></span>
<span class="timeBar"></span>
</div>
</div>
<div class="sound sound2 btn" title="Mute/Unmute sound"><span class="icon-sound"></span></div>
<div class="btnFS btn" title="Switch to full screen"><span class="icon-fullscreen"></span></div>
</div>
</div>
</div>
</section>
Feel free to check out the CSS and JavaScript I used by following the provided jsfiddle link.