09_Media/media5.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á 5</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 VypisInfo ()
25 {
26 T0.innerText=parseInt(Info.currTimeState.activeTime);
27 T1.innerText=parseInt(Medium.currTimeState.activeTime);
28 }
29 </script>
30 </head>
31 <body >
32 <h2>Médiá 5</h2>
33 <p>
34 <span class="platno">
35 <t:media id="Medium" timeAction="visibility" src="sample.wmv" begin="indefinite"
36 onend ="Tlacidla(1,0,0,0); "
37 /></span>
38
39 </p>
40 <div>
41 <button ID="butStart"
42 onclick="Medium.beginElement(); Info.beginElement(); Tlacidla(0,1,0,1); " > Štart </button>
43
44 <button ID="butPauza"
45 onclick="Medium.pauseElement(); Tlacidla(0,0,1,1); "> Pauza </button>
46
47 <button ID="butPokracuj"
48 onclick="Medium.resumeElement(); Tlacidla(0,1,0,1);"> Pokračuj </button>
49
50 <button ID="butStop"
51 onclick="Medium.endElement(); Tlacidla(1,0,0,0); "> Stop </button>
52
53 <script type="text/javascript" >Tlacidla(1,0,0,0);</script>
54 </div>
55 <br />
56 <p>
57 <span id="Info" dur=".1" repeatCount="indefinite" fill="hold" begin="indefinite"
58 onrepeat ="VypisInfo()" >
59 </span>
60 Od štartu: <strong id="T0"></strong>
61 Čas média: <strong id="T1"></strong>
62 </p>
63
64 </body>
65 </html>