X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Ftransports.phh;h=e0b11eedf2398e30bc6184a26755690e1427ff35;hb=296f0c5bf7e59c46e43c55f968c1e8af603f0073;hp=92f11b4a957c0b40a53d1aa7bd54517770a58f86;hpb=5038893a7b944417e7777426f145e2b87f37f4c1;p=brisk.git diff --git a/web/Obj/transports.phh b/web/Obj/transports.phh index 92f11b4..e0b11ee 100644 --- a/web/Obj/transports.phh +++ b/web/Obj/transports.phh @@ -22,6 +22,37 @@ * */ +/* + * test: SO x Browser + * Values: Y: works, N: not works, @: continuous download, + * D: continuous download after first reload + * + * Stream IFRAME: + * + * Iframe| IW | FF | Ch | Op | Ko | IE + * ------+----+----+----+----+----+---- + * Lnx | D | | @ | | @ | x + * Win | x | D | @ | @ | | D + * Mac | x | | | | | + * + * + * XHR | IW | FF | Ch | Op | Ko | IE + * ------+----+----+----+----+----+---- + * Lnx | Y | | ^D | | Y | x + * Win | x | Y | Y | | | N + * Mac | x | | | | | + * + * + * HtmlFl| IW | FF | Ch | Op | Ko | IE + * ------+----+----+----+----+----+---- + * Lnx | N | | | | N | + * Win | x | N | N | | | Y* (* seems delay between click and load of a new page) + * Mac | x | | | | | + * + * + */ + + class Transport_template { function Transport_template() { @@ -47,7 +78,7 @@ class Transport_xhr { function init($enc, &$header_out, $init_string, $base, $step) { - $ret = $init_string; + $ret = sprintf("@BEGIN@ /* %s */ @END@", $init_string); if ($enc != 'plain') $header_out['Content-Encoding'] = $enc; $header_out['Cache-Control'] = 'no-cache, must-revalidate'; // HTTP/1.1 @@ -92,7 +123,7 @@ var xynt_streaming = \"ready\";", $base, $base); if ($step > 0) $ret .= sprintf("last_clean = %d;\n", ($step-1)); $ret .= sprintf(" -window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming.reload(); } }; +window.onload = function () { try { if (xynt_streaming != \"ready\") { xynt_streaming.transp.stopped = true; } } catch(e) { /* console.log(\"catcha\"); */ } }; "); @@ -111,7 +142,7 @@ window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming. "); @@ -139,4 +170,22 @@ push(\"%s\");\n// -->\n", $step, escpush($cont) ); class Transport_htmlfile extends Transport_iframe { } +class Transport { + function Transport() + { + } + + static function create($transp) + { + if ($transp == 'xhr') { + return new Transport_xhr(); + } + else if ($transp == 'htmlfile') { + return new Transport_htmlfile(); + } + else { + return new Transport_iframe(); + } + } +} ?> \ No newline at end of file