09_Media/media6.htm


  1  <?xml version="1.0" encoding="windows-1250"?>
  2  <!DOCTYPE html   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3    "DTD/xhtml1-strict.dtd">
  4  <html xmlns:t="urn:schemas-microsoft-com:time">
  5  <head>
  6    <title>Médiá 6</title>
  7    <meta http-equiv="Author" content="Imrich BURANSKY" />
  8    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1250" />
  9    <?import namespace="t" implementation="#default#time2">
 10    <style>
 11      .platno {
 12        border:1px solid black;  background:silver;  padding:10px;
 13      }
 14      #Info { behavior: url(#default#time2); }
 15    </style>
 16    <script type="text/javascript" >
 17      function Tlacidla(Start, Pauza, Pokracuj, Stop)
 18      {
 19        butStart.disabled=(Start==0);
 20        butPauza.disabled=(Pauza==0);
 21        butPokracuj.disabled=(Pokracuj==0);
 22        butStop.disabled=(Stop==0);
 23      }
 24      function Start()
 25      {
 26        Medium.beginElement();
 27        Info.beginElement();
 28        Tlacidla(0,1,0,1);
 29      }
 30      function Pauza()
 31      {
 32        Medium.pauseElement();
 33        Tlacidla(0,0,1,1);
 34      }
 35      function Pokracuj()
 36      {
 37        Medium.resumeElement();
 38        Tlacidla(0,1,0,1);
 39      }
 40      function Stop()
 41      {
 42        Medium.endElement();
 43        Tlacidla(1,0,0,0);
 44      }
 45      function VypisInfo ()
 46      {
 47        T0.innerText=parseInt(Info.currTimeState.activeTime);
 48        T1.innerText=parseInt(Medium.currTimeState.activeTime);
 49      }
 50    </script>
 51  </head>
 52  <body >
 53  <h2>Médiá 6</h2>
 54  <p>
 55  <span class="platno">
 56  <t:media id="Medium" timeAction="visibility" src="sample.wmv" begin="indefinite"
 57    onend  ="Tlacidla(1,0,0,0); " />
 58  </span>
 59  </p>
 60  <div>
 61    <button ID="butStart" onclick="Start() " > Štart </button>
 62    <button ID="butPauza" onclick="Pauza()">  Pauza </button>
 63    <button  ID="butPokracuj" onclick="Pokracuj()">  Pokračuj </button>
 64    <button ID="butStop"  onclick="Stop()">    Stop  </button>
 65    <script type="text/javascript" >Tlacidla(1,0,0,0);</script>
 66  </div>
 67  <br />
 68  <p>
 69    <span id="Info" dur=".1" repeatCount="indefinite" fill="hold" begin="indefinite"
 70      onrepeat ="VypisInfo()" >
 71    </span>
 72    Od štartu: <strong id="T0"></strong>   
 73    Čas média: <strong id="T1"></strong>
 74  </p>
 75  
 76  </body>
 77  </html>