Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()" type="button">Get the number of available video tracks</button><br> <video id="myVideo" width="320" height="176" controls> <source src="mov_bbb.mp4" type="video/mp4"> <source src="mov_bbb.ogg" type="video/ogg"> Your browser does not support HTML5 video. </video> <script> var vid = document.getElementById("myVideo"); function myFunction() { alert(vid.videoTracks.length); } </script> <p>Video courtesy of <a href="http://www.bigbuckbunny.org/" target="_blank">Big Buck Bunny</a>.</p> </body> <!-- Mirrored from www.w3schools.com/tags/tryit.asp?filename=tryhtml5_av_prop_videotracks by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:10:00 GMT --> </html>
Result:
Try it Yourself - © w3schools.com