ctx_old attribute removed (we will use ctx_old_len only), url_complete js function...
[xynt.git] / web / test-hs.php
1 <html>
2 <head>
3 <script type="text/javascript" src="xynt/xynt-commons.js"></script>
4 <script type="text/javascript" src="xynt/xynt-console.js"></script>
5 <script type="text/javascript" src="xynt/xynt-http-streaming.js"></script>
6 <script type="text/javascript"><!--
7 var gst = null;
8
9 <?php
10     if ($action != 'stop') {
11 ?>
12 window.onload = function () {
13     var hs;
14     var sess;
15
16     sess = '<?php
17     if (!isset($sess)) {
18         $sess = md5(mt_rand());
19     }
20     printf("%s", $sess);
21 ?>';
22     
23     createCookie('sess', sess, 24*365,cookiepath);
24     gst = new globst();
25     hs = new http_streaming(window, gst, sess, console);
26     hs.start('test-hs-rd.php');
27 };
28 <?php
29     }
30 ?>
31
32 window.onkeypress = function () {
33     console.log("win kpress");
34 }
35 //-->
36 </script>
37 <body onabort = "console.log('abort');" onunload = "console.log('unload');" onerror = "console.log('error');" onkeypress = "console.log('keypress');">
38 <div id="cont">INIT</div>
39 <?php
40     if ($action != 'stop') {
41 ?>
42     <a href="test-hs.php?action=stop">STOP</a>
43 <?php
44     } else {
45 ?>
46     <a href="test-hs.php?action=start">START</a>
47 <?php
48     }
49 ?>
50
51 </body>
52 </html>