1 Reply Latest reply on Jan 23, 2012 1:51 AM by Amkeabhi123

    Help with <video> tag! :((

    celoaz

      Hello people!

       

      I'm trying to make an accessible video player in html5, specially for blind people.

      here's the full code:

       

      <html lang="en">

      <head>

      <meta charset="utf-8">

      <meta content="width=620" name="viewport">

      <title>Acessible HTML5 Video</title>

       

       

      </head>

      <body>

      <section id="wrapper">

       

       

      <article>

      <video id="video1" controls="controls">

      <source type="video/mp4" src="teste.mp4" />

       

       

      </video>


      <p id="controls">

      <button onclick="playPause()">Play/Pause</button>

      <button onclicl="forward5s()"> Avancar 5s </button>

      <button onclicl="startAgain()"> Reiniciar </button>

      </p>

       

      <script type="text/javascript">

      var myVideo=document.getElementById("video1");

       

      function playPause()

      {

      if (myVideo.paused)

      myVideo.play();

      else

      myVideo.pause();

      }

       

      function forward5s()

      {

      var sec = myVideo.currentTime();

              sec = sec + 5;

              myVideo.seekTo(sec);

      }

       

       

      function startAgain()

      {

      myVideo.seekTo(0);

      }

       

       

      </script>

      </article>

      </section>

      </body>

      </html>


       

      There are 3 buttons (Play/Pause, Forward 5s and Start Again) but only the Play/Pause button is working good...

      What i'm doing wrong?

       

      Please, any help will be appreciated

      Thanks!