how to show the message ("Tour is loading. Please wait") during loading of xml of files?

  • Hello.
    We have made a big tour (30 panoramas) in which many additional modules are used (html5sound, photo gallery, Google maps, textfield, scrollarea, gyro, webvr, lensflare). And when loading on phone we have a big delay (5-50 seconds depending on the speed of the Internet). And the greatest part of this delay - the black screen.
    But whether is a way instead of this black screen to show the picture with the message "to Tour is loading. Please wait"?
    It is very important for us as many users have a feeling that phone has frozen... :)
    I read messages at a forum on such delays. And I have understood that I won't be able strongly to reduce these delays. For example, about 20-30% of this delay are caused by addition of a plug-in of html5sound (include init.xml).
    Klaus , can be you will prompt as to us to resolve this issue?
    It is perhaps necessary to add team to index.html? I not really well understand html programming...

  • You're treating the symptom and not the cause:
    Problem of blackscreen is that xmls and js are loaded one after the other by krpano once embedpano is done, and then only when finished the tile images are loaded.


    I'm not sure all solutions have been tried in recent krpano releases.I too saw many posts about this and I'm startting to have the same problem. But showing a waiting page is not the good solution, it's a temp fix before a better solution is found.

    => preload all xmls and js manually with native html or javascript before embedding krpano
    [size=10]https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content[/size]

    => concatenate your xmls before you deploy, to minimize the number of files
    (minimize the number of '"includes" you have at the end in your files)

    => load a minimalistic tour.xml, and once you have the onloadcomplete event fired, you could use loadxml (https://krpano.com/docu/actions/#loadxml) to load the rest, the plugins, etc...
    not sure if it works in recent krpano release as in older ones it did not : https://www.krpano.com/forum/wbb/inde…ad&postID=43826

    => if html5sound is the problem, you could contact the author (it's not a krpano base plugin right?)

  • Hi,

    A 30x pano tour is not large and 5-50 seconds delay are very uncommon, so there might some special problem there...

    Lerayfle is right, you should try to find the cause of the loading delay, maybe look if there are preload="true" settings in your xml file, they can block everything because they force a waiting for that particular file.

    And also right - if you have a lot of xml files with several includes, concatenating and minimizing them can be helpful.

    Additionally check your server speed, when the server or the server connection itself is extremely slow, then the best might starting to check there...

    Best regards,
    Klaus


  • Thanks a lot for such detailed answer!
    But the matter is that it is very necessary to make such screen of expectation.
    I have made many experiments today. Even the simple tour created by means of krpano in which there is nothing superfluous even such tour shows the black screen 3-4cek in phone through wifi in Mozilla and 1 sec. in Chrome. If the Internet goes through 3G, then the zazherzhka turns out very big, 5-30 sec. It is necessary for us that in the period of the black screen there was a message or something flickering in order that the user didn't worry.
    I don't know as to make it... I don't know how to connect command execution in index.html with team of a tour in xml.... It is necessary that this screen was switched off upon termination of loading of all xml of files...

    I want to make still experiments with the loadxml team. But it is strong won't help as the main part of plug-ins has to be started at start. Only a little it can help.

    I will write to html5sound developers concerning delay of work of the krpano tour, it really strongly influences.


  • Hi,
    I have only one preload team = "true" in line
    <plugin name="soundinterface" url="plugins/soundinterface.swf" alturl="plugins/soundinterface.js" rootpath="" volume="0.2" preload="true" keep="true"></plugin>

    But I disconnected it, and it didn't help. On the contrary, I am forced to pass to soundinterface.js plug-in as it has accelerated loading in comparison with work of html5sound.

    Here what is included in my tour:
    <include url="%CURRENTXML%/skin/vtourskin.xml"></include>
    <include url="%CURRENTXML%/html5sound/xmls/init.xml"></include>
    <include url="%CURRENTXML%/skin/lensflare/core.xml"></include>
    <include url="%CURRENTXML%/Gallery_photoSM/Gallery_M.xml"></include>
    <include url="%CURRENTXML%/Gallery_photoSM/Setting_gallery.xml"></include>
    in the vtourskin.xml file:
    <include url="%CURRENTXML%/plugins/webvr.xml" devices="html5"></include>

    I tried to disconnect everything, but it hasn't given effect. But when I remove init.xml that becomes quicker even if all teams on this plug-in are disconnected. Each additional sound in a scene increases loading time. Therefore I have also transferred work of music to soundinterface.js (soundinterface.swf).

    I with pleasure would use only a plug-in of soundinterface.js (soundinterface.swf), but in him teams don't work 3D and 2D... At me it has turned out to start only simple sounds.

    But it not all. In we wash a tour there are some more modules. The biggest - it is difficult the menu in which there are a lot of layers and sclrollarea.swf is used. When I move away him, is loaded about 10% quicker.
    There are still modules the plan scheme in which there are also a lot of layers. There is still a module of Google Map and the plan scheme for the VR mode. If to remove all these modules that loading 30% faster. Likely I could divide all these modules in separate xml files and load only at the first appeal to these functions. By means of the loadxml team? Or it is impossible?

  • Hi,

    the html5sound plugin might fully load the sound files before playing them (an assumption, might be not true)...

    The soundinterface.js is only using the HTML5 Audio API and that API only streams them during loading, so there is fewer to load with them.

    But once again about the server - have you checked its speed and performance? Maybe its limited in some ways, e.g. the number of parallel connections?

    Maybe try also testing different browsers and using the browser developer tools (network monitor) to check the loading...

    Best regards,
    Klaus


  • Hi,
    Yes, I understand that the speed of the server can influence. At us all tours are located on one hosting. And on the usual Internet on a usual vompyyuter everything opens quickly. The black screen is too, but it goes one second, it isn't terrible. And everything works on fast devices and the fast Internet too well.
    But our tours will be watched by very different people on very different devices, and under different conditions of speed of the Internet. Therefore the question is very important for us - how to make some picture during the black screen (loading of xml)?

    PS: html5sound plug-in of course at first loads files, but these files on the 500th kilobyte. Matter in another. Similar to the fact that at start of init.xml for work of all tour some processes which strongly take device processor resources are imposed.

  • Hi,

    I have understood how to make the picture before start of tour.xml
    I have created start.xml in which the picture with a logo is started.
    And I have stated in the index.html file:
    tour.call ( "loadpano (start.xml);");
    tour.call ( "loadpano (tour.xml);");
    Has added event onloadcomplete for shutdown of the picture with a logo to tour.xml.

    But I have made in start.xml the picture with animation. But animation doesn't work during loading of all xml of files. There is no opportunity to make animation? Only the static picture?


    Correctly I understand that during performance of initial processing of all xml of files nothing can be carried out in general?

    PS: I have made several experiments, at me it hasn't turned out to use the loadxml team for start of group of commands. I have version 19.16.
    I have drawn a conclusion that the loadxml team won't help for reduction of time of loading of xml of files...

  • Hi,

    e.g. what you could do:
    - show an loading-image or a div element with some text above the krpano viewer - defined in the html file
    - when krpano is ready, hide that element vis js

    Here a simple example:

    In the html file a html element named 'loadinginfo' above the viewer:

    and in the xml file a call to hide it:

    Code
    <events onxmlcomplete="jscall( document.getElementById('loadinginfo').style.display='none'; );" />

    Best regards,
    Klaus


  • Many thanks!!
    I will try these command in our tour. I almost don't know html of programming, but I will try to make animation during loading of xml of files.

    But I want here what to ask still. You have created krpano and the majority of plug-ins. Only you can tell what most of all influences productivity of work of a tour on mobile devices? In our tours it is much used plug-ins of textfield and scrollarea... can do it incorrectly? Also there are a lot of constantly open layers (multipage menu). It can be necessary to do only dynamically created layers (addlayer)?
    I need very to understand - how to optimize our tour that there was more smoothly a graphic work on mobile devices?
    Whether such plug-ins - gyro2, radar and others can influence speed smoothness...?

    Edited once, last by magnifiko (June 21, 2018 at 12:47 AM).

Participate now!

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