Local Krpano application

  • Hi guys,

    i'm trying to build a local krpano application with a virtual tour in it. It should be fully downloadable from chrome store (packaged app) and completely usable offline.
    I'm encountering a problem in loading the xml file that cointains tour description (tour.xml).
    It loads krpano, but fails loading the xml and I get "FATAL ERROR: tour.xml - loading or parsing failed!"

    I read that chrome can't load local xml file, so i have to edit embedpano function to add something like

    Is it possible to edit the main js file autogenerated by MAKE VTOUR droplet? I can pnly get minified version of that file.

    Any other suggestion to solve the problem?

    Ty in advance

    EDIT: I downloaded krpano Protect Tool to generate a .exe file to run the tour embedding all other files. I setup all variables as https://krpano.com/tools/kprotect/#top suggest and I generate the executable file. It loads well the first pano of the tour, but it doesn't load other panos linked from the first: I have an arrow that let the user go on with the tour, but once clicked, nothing happen.

    Edited once, last by Ponc (March 17, 2014 at 4:44 PM).

  • Hi,

    Is it possible to edit the main js file autogenerated by MAKE VTOUR droplet? I can pnly get minified version of that file

    What do want to achieve or what do you expect from that code?
    Skipping the Chrome local file restrictions will be not possible with that of course.

    but once clicked, nothing happen.

    No error in the log?
    Make sure that all files are embedded (the protect tool might not add all automatically).

    Best regards,
    Klaus

  • What do want to achieve or what do you expect from that code?
    Skipping the Chrome local file restrictions will be not possible with that of course.

    Chrome packaged app's security policy doesn't allow the use of "eval" in js script. Now I have two scenarios:

    1) sandboxing the .html page that execute "embedPano" function: this can avoid "eval" problem, but from sandboxed pages I can't load xml file, due to chrome security settings (check https://code.google.com/p/chromium/issues/detail?id=58151, it's a bit old, but situation isn't changed) and krpano throws an XMLHttpRequest cannot load file:///somePath.xml. Cross origin requests are only supported for HTTP.
    So nothing good.... Obv I can't tell to my user to launch Chrome with "--disable-web-security" param.


    2) changing createPanoViewer function to avoid use of evals. This way is technically possible (already tryed it). What do you think 'bout it?

    Thanks for your answer :)

  • Chrome packaged app's security policy doesn't allow the use of "eval" in js script. Now I have two scenarios:

    1) sandboxing the .html page that execute "embedPano" function: this can avoid "eval" problem, but from sandboxed pages I can't load xml file, due to chrome security settings (check https://code.google.com/p/chromium/issues/detail?id=58151, it's a bit old, but situation isn't changed) and krpano throws an XMLHttpRequest cannot load file:///somePath.xml. Cross origin requests are only supported for HTTP.
    So nothing good.... Obv I can't tell to my user to launch Chrome with "--disable-web-security" param.


    2) changing createPanoViewer function to avoid use of evals. This way is technically possible (already tryed it). What do you think 'bout it?

    Thanks for your answer :)

    UP.

    Can you please tell me if the solution 2) is allowed?
    I really need to run krpano locally and build a Chrome app around it, but that eval is really a problem.

    Ty :)

Participate now!

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