how to delete the link to file in the screen of a fatal mistake?

  • Problem: at emergence of a fatal mistake (the black screen) on the screen the complete absolute path to the file which could not be loaded (for example - http://.........../plugins/webvr.xml) is displayed. To us it is very important that nobody has seen the link to file (our hosting).

    Whether there is an opportunity to make that at such mistakes the way to the file was not displayed?
    It is very important for us. Very much we ask for help.
    Maybe somebody faced such problem?

  • <krpano version="1.19" title="Virtual Tour" >


    Hi!
    Thanks! I tried to make so, here a part of my tour.xml:

    <events name="onxmlerror" keep="true" onxmlerror="xmlerror();" />

    <action name="xmlerror" >
    addlayer(xmlerror);
    set(layer[xmlerror].url, %CURRENTXML%/skin/fatalerror.jpg);
    set(layer[xmlerror].keep, true);
    set(layer[xmlerror].zorder, 99);
    set(layer[xmlerror].align, center);
    set(layer[xmlerror].width, 100%);
    set(layer[xmlerror].height, 100%);
    </action>


    But it doesn't work...
    If there is no xml, for example webvr.xml, or because of a bad connection of WiFi couldn't be loaded, then there is a standard option of a mistake which is formed by the main tour.js module
    We have a problem that under no circumstances nobody has to see an absolute path to our files (to our hosting).
    If for example there is a mistake when loading tour .xml, then the method with onxmlerror.events won't help. And such mistake is theoretically possible.
    Can be to eat some team which can be added for example to the index.html file instead of a line - <script src="tour.js"></script> ?

  • Hi,

    you could:

    • use 'null' as startup xml
    • use the onready callback
    • set the onxmlerror event there
    • and then load the first xml.

    E.g.

    Code
    embedpano({xml:null, ..., onready:function(krpano)
    {
       krpano.set("events.onxmlerror", function(){ console.log("error:"+krpano.get("lasterror")); });
       krpano.call("loadpano(tour.xml);");
    }});

    Best regards,
    Klaus

  • It is a shame to me to admit, but I don't know a basis of HTML of programming at all... :( Very much I ask to help to resolve this very important issue up to the end.
    I have added your example to index.html, but the standard option of a mistake from tour.js is all the same displayed...
    Here is how my index.html looks now:


    <!DOCTYPE html>
    <html>
    <head>
    <title>krpano - 9</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta http-equiv="x-ua-compatible" content="IE=edge" />
    <style>
    @-ms-viewport { width:device-width; }
    @media only screen and (min-device-width:800px) { html { overflow:hidden; } }
    html { height:100%; }
    body { height:100%; overflow:hidden; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#FFFFFF; background-color:#000000; }
    </style>
    </head>
    <body>

    <script src="tour.js"></script>

    <script src="html5sound/js/howler.core.min.js"></script>
    <script src="html5sound/js/howler.effects.min.js"></script>

    <div id="pano" style="width:100%;height:100%;">
    <noscript><table style="width:100%;height:100%;"><tr style="vertical-align:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
    <script>
    embedpano({swf:"tour.swf", xml:null, target:"pano", html5:"auto", mobilescale:1.0, onready: function (tour)
    {
    tour.set ("events.onxmlerror", function () {console.log ("error:" + tour.get ("lasterror"));});
    tour.call ( "loadpano (tour.xml);");
    }
    });
    </script>
    </div>

    </body>
    </html>

  • I have now updated all files in a tour to the version 1.19-pr16, and now began to work :) Now at a fatal mistake just black screen. I have added the command and now the black screen with the inscription "ERROR".

    Thanks a lot for the help, Klaus! I didn't know in the new version there is such opportunity :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!